Esempio n. 1
0
        public IActionResult Delete(Guid key)
        {
            var model = _partnerRepo.GetByUid(key);

            _partnerRepo.RemoveServices(key);
            _partnerRepo.Remove(model);

            if (_uow.Commit(this.ModelState))
            {
                if (!String.IsNullOrEmpty(model.Logo))
                {
                    FileHelper.DeleteFile(Path.Combine(this.LogoPath, model.Logo));
                }

                return(Ok());
            }
            else
            {
                return(BadRequest(GetFullErrorMessage(this.ModelState)));
            }
        }
Esempio n. 2
0
 public bool Remove(int id)
 {
     return(_repo.Remove(id));
 }