Commit 877b291d authored by hasan khaddour's avatar hasan khaddour

update IGeneric Repository and IUnitofWork

parent 670ca59a
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Expressions;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace ApplicationCore.Interfaces namespace ApplicationCore.Interfaces
{ {
public interface IGenericRepository public interface IGenericRepository<T> where T : Entities.EntityBase
{ {
public T Update(T entities);
public T Insert(T entities);
public T GetById(int id, params Expression<Func<T, object>>[] includeProperties);
public void Delete(int id);
public IEnumerable<T> GetAll(params Expression<Func<T, object>>[] includeProperties);
} }
} }
...@@ -6,7 +6,11 @@ using System.Threading.Tasks; ...@@ -6,7 +6,11 @@ using System.Threading.Tasks;
namespace ApplicationCore.Interfaces namespace ApplicationCore.Interfaces
{ {
public interface IUnitOfWork public interface IUnitOfWork<T> where T : Entities.EntityBase
{ {
IGenericRepository<T> Entity { get; }
void Save();
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment