public async Task <IHttpActionResult> Delete([FromODataUri] int OrderLineID) { var item = await _service.FindAsync(OrderLineID); if (item == null) { return(NotFound()); } item.ObjectState = ObjectState.Deleted; _service.Delete(item); await _unitOfWorkAsync.SaveChangesAsync(); return(StatusCode(HttpStatusCode.NoContent)); }
public void Delete(int id) { _orderlineService.Delete(id); }