public IHttpActionResult Delete(int id)
        {
            if (id <= 0)
            {
                return(ResponseMessage(CreateCustomResponseMessage(HttpStatusCode.BadRequest)));
            }
            var result = _monsterService.Delete(id);

            return(ResponseMessage(CreateCustomResponseMessage(result)));
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
 // DELETE api/values/5
 public bool Delete(int id)
 {
     _monsterService.Delete(id);
     return true;
 }