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));
        }
예제 #2
0
 public void Delete(int id)
 {
     _orderlineService.Delete(id);
 }