Beispiel #1
0
 public static void Delete(this ComicTrackerDbContext dbContext, BaseDeletableModel <int> entity)
 {
     entity.IsDeleted = true;
     entity.DeletedOn = DateTime.UtcNow;
     dbContext.Update(entity);
 }
Beispiel #2
0
 public static void HardDelete(this ComicTrackerDbContext dbContext, BaseModel <int> entity)
 => dbContext.Remove(entity);
Beispiel #3
0
 public static void Undelete(this ComicTrackerDbContext dbContext, BaseDeletableModel <int> entity)
 {
     entity.IsDeleted = false;
     entity.DeletedOn = null;
     dbContext.Update(entity);
 }