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))); } }
public bool Remove(int id) { return(_repo.Remove(id)); }