示例#1
0
        public IActionResult Delete(string id)
        {
            var model = serviceAInstance.GetModel(new ObjectId(id));

            if (model == null)
            {
                return(NotFound());
            }

            serviceAInstance.Remove(model.Id);
            return(new OkResult());
        }
        public void Delete(string id)
        {
            var model = service.GetModel(new ObjectId(id));

            service.Remove(model.Id);
        }