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))); } }
public List <ReadBeerKind> GetAll() { using (Context context = new Context()) { EfBeerKindRepository rep = new EfBeerKindRepository(context); BeerKindConvert convert = new BeerKindConvert(context); return(convert.ToReadList(rep.GetAll())); } }
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))); } }
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)))); } }