예제 #1
0
 /*
  * Creates the passed entity in the DB.
  */
 public T Add(T entity)
 {
     entity.IsActive = true;
     entity.Version  = 1;
     _dbContext.Set <T>().Add(entity);
     _dbContext.SaveChanges();
     return(entity);
 }