public ServiceResultModel <bool> Delete(Guid id) { var res = new ServiceResultModel <bool> { IsSuccess = false, Errors = new List <string>() }; var data = _applicationTypeRepository.GetById(id); if (res == null) { res.Data = false; res.Errors.Add("The Application Type doesn't exists"); return(res); } _applicationTypeRepository.Delete(data); UnitOfWork.Commit(); res.Data = true; return(res); }