public static async Task <OrganisationEntity> GetByNameAsync(string connectionString, string organisationName) => await SqlRunner.FetchSingleResultAsync <OrganisationEntity>(connectionString, $@"SELECT TOP (1) OrganisationId, Name FROM Organisations WHERE Name = @organisationName ORDER BY Name ASC", new { organisationName });
public static async Task <OrganisationEntity> GetByNameAsync(string connectionString, string organisationName) { const string sql = @" SELECT TOP (1) OrganisationId, Name FROM dbo.Organisations WHERE Name = @organisationName ORDER BY Name ASC"; return(await SqlRunner.FetchSingleResultAsync <OrganisationEntity>( connectionString, sql, new { organisationName })); }
public async Task <GetUser> GetAsync(string connectionString) => await SqlRunner.FetchSingleResultAsync <GetUser>(connectionString, GetSql, this);
public async Task <string> GetIdByEmail(string connectionString) => await SqlRunner.FetchSingleResultAsync <string>(connectionString, GetIdByEmailSql, this);