public void Create(T entity) { entity.DateCreated = DateTime.UtcNow; entity.DateUpdated = DateTime.UtcNow; _context.Set <T>().Add(entity); }
public GenericRepository(DawAppContext dbContext) { _context = dbContext; _table = _context.Set <TEntity>(); }
public GenericRepository(DawAppContext context) { _context = context; _table = context.Set <T>(); }