private void DeleteAuthorisation(AuthorisationEntity authorisation) { IAuthorisationRepository authorisationRepo = AuthorisationRepoFactory.GetAuthorisationRepository(DatabaseOption.DatabaseEngine, DatabaseOption.DbConnectionString); authorisationRepo.DeleteAuthorisation(authorisation); }
private void PersistAuthorisation(MessageDbCore.EntityClasses.Authorisation authorisation) { IAuthorisationRepository authorisationRepo = AuthorisationRepoFactory.GetAuthorisationRepository(DatabaseOption.DatabaseEngine, DatabaseOption.DbConnectionString); authorisationRepo.InsertAuthorisation(authorisation); }
private AuthorisationEntity GetAuthorisation(string authorisationCode) { Guid authorisationCodeGuid; if (string.IsNullOrEmpty(authorisationCode) || !Guid.TryParse(authorisationCode, out authorisationCodeGuid)) { return(null); } IAuthorisationRepository authorisationRepo = AuthorisationRepoFactory.GetAuthorisationRepository(DatabaseOption.DatabaseEngine, DatabaseOption.DbConnectionString); AuthorisationEntity authorisation = authorisationRepo.GetAuthorisationMatchingAuthCode(authorisationCodeGuid); return(authorisation); }