WIP setting up new data project structure and event handlers

This commit is contained in:
2019-04-23 17:42:16 +00:00
parent 49f6ee5542
commit a437573af0
18 changed files with 196 additions and 85 deletions

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BrightGlimmer.Data.Interfaces
{
public interface IRepository<T>
{
IUnitOfWork UnitOfWork { get; }
T Create(T entity);
T Update(T entity);
void Remove(Guid id);
IQueryable<T> Get();
T Get(Guid id);
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace BrightGlimmer.Data.Interfaces
{
public interface IUnitOfWork
{
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}
}