public IHttpActionResult Delete(int id) { if (id <= 0) { return(ResponseMessage(CreateCustomResponseMessage(HttpStatusCode.BadRequest))); } var result = _monsterService.Delete(id); return(ResponseMessage(CreateCustomResponseMessage(result))); }
public async Task <bool> DeleteMonsetrAsync(Guid id) { using (var uow = UnitOfWorkProvider.Create()) { if ((await _monsterService.GetAsync(id, false)) == null) { return(false); } _monsterService.Delete(id); await uow.Commit(); return(true); } }
// DELETE api/values/5 public bool Delete(int id) { _monsterService.Delete(id); return true; }