mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 17:27:48 +00:00
added Data, Models, EntityFramework
This commit is contained in:
25
Data/Abstract/IEntityBaseRepository.cs
Normal file
25
Data/Abstract/IEntityBaseRepository.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq.Expressions;
|
||||
using LiveGameFeed.Models;
|
||||
|
||||
namespace LiveGameFeed.Data.Abstract
|
||||
{
|
||||
public interface IEntityBaseRepository<T> where T : class, IEntityBase, new()
|
||||
{
|
||||
IEnumerable<T> AllIncluding(params Expression<Func<T, object>>[] includeProperties);
|
||||
IEnumerable<T> GetAll();
|
||||
int Count();
|
||||
T GetSingle(int id);
|
||||
T GetSingle(Expression<Func<T, bool>> predicate);
|
||||
T GetSingle(Expression<Func<T, bool>> predicate, params Expression<Func<T, object>>[] includeProperties);
|
||||
IEnumerable<T> FindBy(Expression<Func<T, bool>> predicate);
|
||||
void Add(T entity);
|
||||
void Update(T entity);
|
||||
void Delete(T entity);
|
||||
void DeleteWhere(Expression<Func<T, bool>> predicate);
|
||||
void Commit();
|
||||
}
|
||||
}
|
||||
13
Data/Abstract/IRepositories.cs
Normal file
13
Data/Abstract/IRepositories.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using LiveGameFeed.Models;
|
||||
|
||||
namespace LiveGameFeed.Data.Abstract
|
||||
{
|
||||
public interface IMatchRepository : IEntityBaseRepository<Match> { }
|
||||
|
||||
public interface IFeedRepository : IEntityBaseRepository<Feed> { }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user