public async Task <DAL.App.DTO.AdministrativeUnit> FindForUserAsync(int id, int userId) { var AdministrativeUnit = await RepositoryDbSet .FirstOrDefaultAsync(m => m.Id == id && m.AppUserId == userId); return(AdministrativeUnitMapper.MapFromDomain(AdministrativeUnit)); }
public async Task <DAL.App.DTO.Location> FindForUserAsync(int id, int userId) { var Location = await RepositoryDbSet .FirstOrDefaultAsync(m => m.Id == id && m.AppUserId == userId); return(LocationMapper.MapFromDomain(Location)); }
public async Task <Symptom> FindByNameAsync(string name) { return(await RepositoryDbSet.FirstOrDefaultAsync(s => s.SymptomName == name)); }
public Task <TIdentityRole> FindByNameAsync(string normalizedName, CancellationToken cancellationToken = default(CancellationToken)) { var firstOrDefaultAsync = RepositoryDbSet.FirstOrDefaultAsync(predicate: r => r.NormalizedName == normalizedName, cancellationToken: cancellationToken); return(firstOrDefaultAsync); }
public async Task <Disease> FindByNameAsync(string name) { return(await RepositoryDbSet.FirstOrDefaultAsync(d => d.DiseaseName == name)); }
public Task <IdentityUserToken <TKey> > FindTokenAsync(TKey id, string loginProvider, string name, CancellationToken cancellationToken = default(CancellationToken)) { return(RepositoryDbSet .FirstOrDefaultAsync(predicate: ut => ut.IdentityUserId.Equals(id) && ut.LoginProvider == loginProvider && ut.Name == name, cancellationToken: cancellationToken)); }
public Task <TUser> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken)) { return(RepositoryDbSet.FirstOrDefaultAsync(predicate: u => u.NormalizedUserName == normalizedUserName, cancellationToken: cancellationToken)); }