コード例 #1
0
        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);
 }