Beispiel #1
0
 TEntity IRepositoryContext <TEntity> .Delete(Func <TEntity, bool> predicate)
 {
     using (ctx = new DataContexto())
     {
         ctx.Set <TEntity>().Where(predicate).ToList().ForEach(d => { entity = ctx.Set <TEntity>().Remove(d); });
         ctx.SaveChanges();
         return(entity);
     }
 }
Beispiel #2
0
 public DataContract()
 {
     ctx = new DataContexto();
 }