24 lines
765 B
C#
24 lines
765 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.Logging;
|
|
using PARR.Core.Repositories.Interfaces.Unit;
|
|
using PARR.DAL.Context;
|
|
using PARR.DAL.Repositories.Base;
|
|
|
|
namespace PARR.DAL.Repositories.Unit
|
|
{
|
|
internal class UnitRepository : BaseRepository<Domain.Entities.Unit.Unit>, IUnitRepository
|
|
{
|
|
public UnitRepository(DataContext dataContext, ILogger<UnitRepository> logger) : base(logger, dataContext) { }
|
|
|
|
|
|
public IQueryable<Domain.Entities.Unit.Unit> GetWithIncludes()
|
|
{
|
|
return Get()
|
|
.Include(t => t.UnitValues)
|
|
.ThenInclude(t => t.Field)
|
|
.Include(t => t.UnitValues)
|
|
.ThenInclude(t => t.Value);
|
|
}
|
|
}
|
|
}
|