Exemple #1
0
 public bool Update(UpdateBeerKind item)
 {
     using (Context context = new Context())
     {
         EfBeerKindRepository rep     = new EfBeerKindRepository(context);
         BeerKindConvert      convert = new BeerKindConvert(context);
         return(rep.Update(convert.ToEntity(item)));
     }
 }
Exemple #2
0
 public List <ReadBeerKind> GetAll()
 {
     using (Context context = new Context())
     {
         EfBeerKindRepository rep     = new EfBeerKindRepository(context);
         BeerKindConvert      convert = new BeerKindConvert(context);
         return(convert.ToReadList(rep.GetAll()));
     }
 }
Exemple #3
0
 public ReadBeerKind Remove(int id)
 {
     using (Context context = new Context())
     {
         EfBeerKindRepository rep     = new EfBeerKindRepository(context);
         BeerKindConvert      convert = new BeerKindConvert(context);
         return(convert.ToRead(rep.Remove(id)));
     }
 }
Exemple #4
0
 public ReadBeerKind Add(CreateBeerKind item)
 {
     using (Context context = new Context())
     {
         EfBeerKindRepository rep     = new EfBeerKindRepository(context);
         BeerKindConvert      convert = new BeerKindConvert(context);
         return(convert.ToRead(rep.Add(convert.ToEntity(item))));
     }
 }