public ReadSale Remove(int id) { using (Context context = new Context()) { EfSaleRepository rep = new EfSaleRepository(context); SaleConvert convert = new SaleConvert(context); return(convert.ToRead(rep.Remove(id))); } }
public ReadSale Add(CreateSale item) { using (Context context = new Context()) { EfSaleRepository rep = new EfSaleRepository(context); SaleConvert convert = new SaleConvert(context); return(convert.ToRead(rep.Add(convert.ToEntity(item)))); } }