public async Task <ResultPT> DeleteAsync(int id) { ResultPT result; using (Sales_DetailsBAL Sales_DetailsBAL = new Sales_DetailsBAL()) { result = await Sales_DetailsBAL.DeleteAsync(id); } return(result); }
public async Task <ResultPT> GetAsync() { ResultPT result; using (Sales_DetailsBAL Sales_DetailsBAL = new Sales_DetailsBAL()) { result = await Sales_DetailsBAL.GetAllAsync(); } return(result); }
public async Task <ResultPT> PutAsync(int id, [FromBody] Sales_DetailsDTO value) { ResultPT result = null; if (ModelState.IsValid) { using (Sales_DetailsBAL Sales_DetailsBAL = new Sales_DetailsBAL()) { result = await Sales_DetailsBAL.UpdateAsync(value); } } return(result); }
public async Task <ResultPT> PostAsync([FromBody] List <Sales_DetailsDTO> values) { ResultPT result = null; if (ModelState.IsValid) { using (Sales_DetailsBAL Sales_DetailsBAL = new Sales_DetailsBAL()) { foreach (var value in values) { result = await Sales_DetailsBAL.InsertAsync(value); } } } return(result); }