public IHttpActionResult DeleteCollection(int?id)
        {
            try
            {
                if (!id.HasValue)
                {
                    return(BadRequest());
                }

                List <int?> ids = new List <int?>();
                ids.Add(id.Value);

                var result = oSvc.DeleteCollection(ids);
                return(Ok(result));
            }
            catch (Exception ex)
            {
                CollectionModel result = new CollectionModel()
                {
                    //Exception = _exception.Set(ExceptionType.CATCH, ex)
                };
                return(Ok(ex));
            };
        }
Esempio n. 2
0
 public IActionResult DeleteCollection([FromBody] Collection collection)
 {
     collectionServices.DeleteCollection(collection);
     return(new OkResult());
 }