Daten können hinzugefügt
This commit is contained in:
21
KanSan.Base/Interfaces/IRepository.cs
Normal file
21
KanSan.Base/Interfaces/IRepository.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan.Base.Interfaces
|
||||
{
|
||||
public interface IRepository<TEntity> where TEntity: class
|
||||
{
|
||||
void Delete(TEntity entityToDelete);
|
||||
void Delete(object id);
|
||||
IEnumerable<TEntity> Get(
|
||||
Expression<Func<TEntity, bool>> filter = null,
|
||||
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBy = null,
|
||||
string includeProperties = "");
|
||||
TEntity GetByID(object id);
|
||||
void Insert(TEntity entity);
|
||||
void Update(TEntity entityToUpdate);
|
||||
}
|
||||
}
|
||||
14
KanSan.Base/Interfaces/IUnitOfWork.cs
Normal file
14
KanSan.Base/Interfaces/IUnitOfWork.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using KanSan.Base.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan.Base.Interfaces
|
||||
{
|
||||
public interface IUnitOfWork
|
||||
{
|
||||
IRepository<Baustelle> BaustellenRepository { get; }
|
||||
IRepository<Kunde> KundenRepository { get; }
|
||||
void Commit();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user