Archetektur angefangen
This commit is contained in:
11
DataStoring.Contract/DataStoring.Contract.csproj
Normal file
11
DataStoring.Contract/DataStoring.Contract.csproj
Normal file
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\KanSan.DataClasses\KanSan.DataClasses.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
12
DataStoring.Contract/IKundenRepository.cs
Normal file
12
DataStoring.Contract/IKundenRepository.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using KanSan.CrossCutting.DataClasses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan.DataStoring.Contract
|
||||
{
|
||||
public interface IKundenRepository
|
||||
{
|
||||
List<Kunde> Query { get; }
|
||||
}
|
||||
}
|
||||
24
DataStoring.Contract/IRepository.cs
Normal file
24
DataStoring.Contract/IRepository.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan.DataStoring.Contract
|
||||
{
|
||||
public interface IRepository<TEntity> where TEntity : class
|
||||
{
|
||||
void Delete(TEntity entityToDelete);
|
||||
void Delete(int id);
|
||||
IEnumerable<TEntity> GetAll(string include);
|
||||
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 entity);
|
||||
IQueryable<TEntity> Include(params Expression<Func<TEntity, object>>[] includes);
|
||||
IQueryable<TEntity> Query { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user