Ejemplo n.º 1
0
 public bool Update(UpdateBeerBottle item)
 {
     using (Context context = new Context())
     {
         EfBeerBottleRepository rep     = new EfBeerBottleRepository(context);
         BeerBottleConvert      convert = new BeerBottleConvert(context);
         return(rep.Update(convert.ToEntity(item)));
     }
 }
Ejemplo n.º 2
0
 public List <ReadBeerBottle> GetAll()
 {
     using (Context context = new Context())
     {
         EfBeerBottleRepository rep     = new EfBeerBottleRepository(context);
         BeerBottleConvert      convert = new BeerBottleConvert(context);
         return(convert.ToReadList(rep.GetAll()));
     }
 }
Ejemplo n.º 3
0
 public ReadBeerBottle Remove(int id)
 {
     using (Context context = new Context())
     {
         EfBeerBottleRepository rep     = new EfBeerBottleRepository(context);
         BeerBottleConvert      convert = new BeerBottleConvert(context);
         return(convert.ToRead(rep.Remove(id)));
     }
 }
Ejemplo n.º 4
0
 public ReadBeerBottle Add(CreateBeerBottle item)
 {
     using (Context context = new Context())
     {
         EfBeerBottleRepository rep     = new EfBeerBottleRepository(context);
         BeerBottleConvert      convert = new BeerBottleConvert(context);
         return(convert.ToRead(rep.Add(convert.ToEntity(item))));
     }
 }