Lots of data and model setup
This commit is contained in:
15
SVSim.Database/Repositories/BaseRepository.cs
Normal file
15
SVSim.Database/Repositories/BaseRepository.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SVSim.Database.Repositories;
|
||||
|
||||
public abstract class BaseRepository<T> where T : class
|
||||
{
|
||||
protected readonly SVSimDbContext DbContext;
|
||||
protected readonly DbSet<T> DbSet;
|
||||
|
||||
public BaseRepository(SVSimDbContext dbContext)
|
||||
{
|
||||
DbContext = dbContext;
|
||||
DbSet = DbContext.Set<T>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user