BELLLLLOO(DB/Done)2
This commit is contained in:
parent
ea99225579
commit
86b4759087
@ -5,8 +5,6 @@ namespace Demo.Data.Repository
|
||||
public interface IPresenceRepository
|
||||
{
|
||||
List<PresenceLocalEntity> GetAllPresences();
|
||||
List<PresenceLocalEntity>? GetPresenceByGroup();
|
||||
List<PresenceLocalEntity> GetPresenceByGroupDate();
|
||||
void IsAttedance(int firstLesson, int lastLesson, DateOnly date, Guid UserGuid);
|
||||
List<PresenceLocalEntity> GeneratePresence(List<PresenceLocalEntity> presenceLocalEntities);
|
||||
}
|
||||
|
@ -19,14 +19,6 @@ namespace Demo.Data.Repository
|
||||
return _remoteDatabaseContext.PresenceDaos.Select(x => new PresenceLocalEntity{UserGuid = x.UserGuid, Date = x.Date, LessonNumber = x.LessonNumber, IsAttedance = x.IsAttedance}).ToList();
|
||||
}
|
||||
|
||||
public List<PresenceLocalEntity> GetPresenceByGroup(){
|
||||
return _remoteDatabaseContext.PresenceDaos.Select(x => new PresenceLocalEntity{UserGuid = x.UserGuid, Date = x.Date, LessonNumber = x.LessonNumber, IsAttedance = x.IsAttedance}).ToList();
|
||||
}
|
||||
|
||||
public List<PresenceLocalEntity> GetPresenceByGroupDate(){
|
||||
return _remoteDatabaseContext.PresenceDaos.Select(x => new PresenceLocalEntity{UserGuid = x.UserGuid, Date = x.Date, LessonNumber = x.LessonNumber, IsAttedance = x.IsAttedance}).ToList();
|
||||
}
|
||||
|
||||
public List<PresenceLocalEntity> GeneratePresence(List<PresenceLocalEntity> presenceLocalEntities)
|
||||
{
|
||||
var presences = presenceLocalEntities.Select(x => new PresenceDAO
|
||||
|
@ -21,7 +21,7 @@ namespace Demo.Domain.UseCase
|
||||
var usersByGroup = _repositoryUserImpl.GetAllUser()
|
||||
.Where(user => user.GroupID == groupID).ToList();
|
||||
|
||||
var presenceByGroup = _repositoryPresenceImpl.GetPresenceByGroup()
|
||||
var presenceByGroup = _repositoryPresenceImpl.GetAllPresences()
|
||||
.Where(x => usersByGroup.Any(user => user.Guid == x.UserGuid))
|
||||
.Select(presence => new Presence{
|
||||
User = new User{
|
||||
@ -44,7 +44,7 @@ namespace Demo.Domain.UseCase
|
||||
var usersByGroup = _repositoryUserImpl.GetAllUser()
|
||||
.Where(user => user.GroupID == groupID).ToList();
|
||||
|
||||
var presenceByGroup = _repositoryPresenceImpl.GetPresenceByGroup()
|
||||
var presenceByGroup = _repositoryPresenceImpl.GetAllPresences()
|
||||
.Where(x => usersByGroup.Any(user => user.Guid == x.UserGuid && x.Date == date))
|
||||
.Select(presence => new Presence{
|
||||
User = new User{
|
||||
|
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Demo")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+2d00dc5129cceff9be5a6e517f99e6960a617e3c")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ea99225579b2fe5759998c1d40840070bd9463e0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Demo")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Demo")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
9b323ba14d380bc1418c48d0712d3e9e530672d0b6f95d67907fc8a7fbdacb7a
|
||||
80d5c4821e3ff98a41b6c458f427344bd492e44a8a96d916098f8470ef998b85
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user