public bool UpdateCertificate(CertificateModel model) { if (model.Id == null) { return(false); } if (_certificateRepository.Has(model.Id.Value)) { Certificate entity = model.ToEntity(); return(_certificateRepository.Update(entity)); } return(false); }