public ReadStockPosition Remove(int id) { using (Context context = new Context()) { EfStockPositionRepository rep = new EfStockPositionRepository(context); StockPositionConvert convert = new StockPositionConvert(context); return(convert.ToRead(rep.Remove(id))); } }
public ReadStockPosition Add(CreateStockPosition item) { using (Context context = new Context()) { EfStockPositionRepository rep = new EfStockPositionRepository(context); StockPositionConvert convert = new StockPositionConvert(context); return(convert.ToRead(rep.Add(convert.ToEntity(item)))); } }