public ResponseViewModel Delete(int id) { var response = new ResponseViewModel(); var status = _statusDal.GetStatus(p => p.Id == id); if (status == null) { response.IsSuccess = false; response.Message = "Status bulunamadı."; return(response); } status.IsDeleted = true; _statusDal.Update(status); var saving = _statusDal.SaveChanges(); if (!saving) { response.IsSuccess = false; response.Message = "Status silme işlemi sırasında hata oluştu."; return(response); } response.Data = status; return(response); }
private bool IsStatusHave(int statusId) { var status = _statusDal.GetStatus(x => x.Id == statusId); if (status == null) { return(false); } else { return(true); } }