refactor: Projektdateien migriert. Cloud-NuGet-Pakete durch lokale NuGet-Projekte ersetzt.
This commit is contained in:
29
DAL/Repositories/WebAppAdditionalRoleRepository.cs
Normal file
29
DAL/Repositories/WebAppAdditionalRoleRepository.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using DAL.Models.Entities;
|
||||
using DAL.Models.Filters;
|
||||
using HRD.WebApi.Repositories;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DAL.Repositories
|
||||
{
|
||||
public class WebAppAdditionalRoleRepository : BaseRepository<WebAppAdditionalRole>
|
||||
{
|
||||
public WebAppAdditionalRoleRepository() : base(new WebApiContext())
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<List<WebAppAdditionalRole>> GetListByFilterAsync(WebAppFilter filter, bool asNoTracking = true)
|
||||
{
|
||||
var items = this.RepositoryContext.Set<WebAppAdditionalRole>().AsQueryable();
|
||||
|
||||
if (filter.WebAppId != null && filter.WebAppId != 0)
|
||||
{
|
||||
items = items.Where(x => x.WebAppId == filter.WebAppId);
|
||||
}
|
||||
|
||||
return asNoTracking ? await items.AsNoTracking().ToListAsync() : await items.ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user