diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index 063c918..09e1d95 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -5,8 +5,6 @@ "\\Zurnal\\Date", "\\Zurnal\\Date\\LocalDate", "\\Zurnal\\Date\\Repository", - "\\Zurnal\\Domain\\Model", - "\\Zurnal\\Domain\\UseCase", "\\Zurnal\\Presence", "\\Zurnal\\RemaDateBase", "\\Zurnal\\RemaDateBase\\Interfase" diff --git a/.vs/Zurnal/FileContentIndex/2f39826d-71c7-4f19-af77-690086bb260c.vsidx b/.vs/Zurnal/FileContentIndex/2f39826d-71c7-4f19-af77-690086bb260c.vsidx new file mode 100644 index 0000000..ed2bd16 Binary files /dev/null and b/.vs/Zurnal/FileContentIndex/2f39826d-71c7-4f19-af77-690086bb260c.vsidx differ diff --git a/.vs/Zurnal/FileContentIndex/5d79ffcc-b2b2-42c0-b30e-1b013c3073ca.vsidx b/.vs/Zurnal/FileContentIndex/5d79ffcc-b2b2-42c0-b30e-1b013c3073ca.vsidx new file mode 100644 index 0000000..f517455 Binary files /dev/null and b/.vs/Zurnal/FileContentIndex/5d79ffcc-b2b2-42c0-b30e-1b013c3073ca.vsidx differ diff --git a/.vs/Zurnal/FileContentIndex/a3b9e99d-c539-4e0e-9624-97cb854031f9.vsidx b/.vs/Zurnal/FileContentIndex/a3b9e99d-c539-4e0e-9624-97cb854031f9.vsidx deleted file mode 100644 index ccc0a04..0000000 Binary files a/.vs/Zurnal/FileContentIndex/a3b9e99d-c539-4e0e-9624-97cb854031f9.vsidx and /dev/null differ diff --git a/.vs/Zurnal/FileContentIndex/fc8d342a-e734-460f-a849-02f39470e4c5.vsidx b/.vs/Zurnal/FileContentIndex/fc8d342a-e734-460f-a849-02f39470e4c5.vsidx deleted file mode 100644 index be24aca..0000000 Binary files a/.vs/Zurnal/FileContentIndex/fc8d342a-e734-460f-a849-02f39470e4c5.vsidx and /dev/null differ diff --git a/.vs/Zurnal/v17/.wsuo b/.vs/Zurnal/v17/.wsuo index 041810d..4e52d4b 100644 Binary files a/.vs/Zurnal/v17/.wsuo and b/.vs/Zurnal/v17/.wsuo differ diff --git a/.vs/Zurnal/v17/DocumentLayout.backup.json b/.vs/Zurnal/v17/DocumentLayout.backup.json index a00415c..5ff52a6 100644 --- a/.vs/Zurnal/v17/DocumentLayout.backup.json +++ b/.vs/Zurnal/v17/DocumentLayout.backup.json @@ -64,7 +64,7 @@ "RelativeDocumentMoniker": "Zurnal\\RemaDateBase\\Interfase\\IGroupRepository.cs", "ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\Interfase\\IGroupRepository.cs", "RelativeToolTip": "Zurnal\\RemaDateBase\\Interfase\\IGroupRepository.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAA==", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-10-24T11:28:40.405Z", "EditorCaption": "" diff --git a/.vs/Zurnal/v17/DocumentLayout.json b/.vs/Zurnal/v17/DocumentLayout.json index 5ff52a6..0756816 100644 --- a/.vs/Zurnal/v17/DocumentLayout.json +++ b/.vs/Zurnal/v17/DocumentLayout.json @@ -3,8 +3,8 @@ "WorkspaceRootPath": "C:\\Users\\profi\\source\\repos\\Zurnal\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\SQLGroupRepositoryImpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\RemaDateBase\\SQLGroupRepositoryImpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\DateDao\\PresnceDao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\RemaDateBase\\DateDao\\PresnceDao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\Interfase\\IGroupRepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", @@ -22,10 +22,6 @@ "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\DateDao\\GroupDao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\RemaDateBase\\DateDao\\GroupDao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\DateDao\\PresnceDao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\RemaDateBase\\DateDao\\PresnceDao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\DateDao\\UserDao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\RemaDateBase\\DateDao\\UserDao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -66,25 +62,11 @@ "RelativeToolTip": "Zurnal\\RemaDateBase\\Interfase\\IGroupRepository.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-10-24T11:28:40.405Z", - "EditorCaption": "" + "WhenOpened": "2024-10-24T11:28:40.405Z" }, { "$type": "Document", "DocumentIndex": 0, - "Title": "SQLGroupRepositoryImpl.cs", - "DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\SQLGroupRepositoryImpl.cs", - "RelativeDocumentMoniker": "Zurnal\\RemaDateBase\\SQLGroupRepositoryImpl.cs", - "ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\SQLGroupRepositoryImpl.cs", - "RelativeToolTip": "Zurnal\\RemaDateBase\\SQLGroupRepositoryImpl.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-10-24T11:16:10.51Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 5, "Title": "PresnceDao.cs", "DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\DateDao\\PresnceDao.cs", "RelativeDocumentMoniker": "Zurnal\\RemaDateBase\\DateDao\\PresnceDao.cs", @@ -105,12 +87,11 @@ "RelativeToolTip": "Zurnal\\RemaDateBase\\DateDao\\GroupDao.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAAYAAAAwAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-10-24T11:06:19.494Z", - "EditorCaption": "" + "WhenOpened": "2024-10-24T11:06:19.494Z" }, { "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 5, "Title": "UserDao.cs", "DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\DateDao\\UserDao.cs", "RelativeDocumentMoniker": "Zurnal\\RemaDateBase\\DateDao\\UserDao.cs", @@ -118,12 +99,11 @@ "RelativeToolTip": "Zurnal\\RemaDateBase\\DateDao\\UserDao.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAAUAAAAiAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-10-24T11:05:48.709Z", - "EditorCaption": "" + "WhenOpened": "2024-10-24T11:05:48.709Z" }, { "$type": "Document", - "DocumentIndex": 7, + "DocumentIndex": 6, "Title": "RemoutDateBase.cs", "DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\RemoutDateBase.cs", "RelativeDocumentMoniker": "Zurnal\\RemaDateBase\\RemoutDateBase.cs", @@ -131,8 +111,7 @@ "RelativeToolTip": "Zurnal\\RemaDateBase\\RemoutDateBase.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABsAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-10-24T10:21:18.176Z", - "EditorCaption": "" + "WhenOpened": "2024-10-24T10:21:18.176Z" }, { "$type": "Document", @@ -144,12 +123,11 @@ "RelativeToolTip": "Zurnal\\Date\\Repository\\IGroupRepository.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAyAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-10-23T08:03:02.814Z", - "EditorCaption": "" + "WhenOpened": "2024-10-23T08:03:02.814Z" }, { "$type": "Document", - "DocumentIndex": 9, + "DocumentIndex": 8, "Title": "GroupUseCase.cs", "DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\GroupUseCase.cs", "RelativeDocumentMoniker": "Zurnal\\Domain\\UseCase\\GroupUseCase.cs", @@ -157,12 +135,11 @@ "RelativeToolTip": "Zurnal\\Domain\\UseCase\\GroupUseCase.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-10-23T08:01:08.054Z", - "EditorCaption": "" + "WhenOpened": "2024-10-23T08:01:08.054Z" }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 7, "Title": "UseCasePresence.cs", "DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UseCasePresence.cs", "RelativeDocumentMoniker": "Zurnal\\Domain\\UseCase\\UseCasePresence.cs", @@ -170,8 +147,7 @@ "RelativeToolTip": "Zurnal\\Domain\\UseCase\\UseCasePresence.cs", "ViewState": "AgIAAAYAAAAAAAAAAAAAAB8AAABfAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-10-21T11:51:23.091Z", - "EditorCaption": "" + "WhenOpened": "2024-10-21T11:51:23.091Z" }, { "$type": "Document", @@ -183,8 +159,7 @@ "RelativeToolTip": "Zurnal\\Presence\\UseCaseGeneratePresence.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAAYAAAAZAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-10-21T10:49:23.262Z", - "EditorCaption": "" + "WhenOpened": "2024-10-21T10:49:23.262Z" } ] } diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 4ad5bd0..4f83574 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/Zurnal/RemaDateBase/DateDao/PresnceDao.cs b/Zurnal/RemaDateBase/DateDao/PresnceDao.cs index 2841c60..4c830e2 100644 --- a/Zurnal/RemaDateBase/DateDao/PresnceDao.cs +++ b/Zurnal/RemaDateBase/DateDao/PresnceDao.cs @@ -2,7 +2,7 @@ public class PresnceDao { - public Guid Guid { get; set; } + public Guid UserGuid { get; set; } public bool IsAttendensy { get; set; } = true; public int LessonNumber { get; set; } public DateOnly Date { get; set; } diff --git a/Zurnal/RemaDateBase/RemoutDateBase.cs b/Zurnal/RemaDateBase/RemoutDateBase.cs index 4937972..88a4695 100644 --- a/Zurnal/RemaDateBase/RemoutDateBase.cs +++ b/Zurnal/RemaDateBase/RemoutDateBase.cs @@ -1,33 +1,33 @@ using System; using Microsoft.EntityFrameworkCore; -public class RemoteDateBaseContext: DbContext +public class RemoteDateBaseContext : DbContext { - public Class() - { - public DbSet Group { get; set; } - public DbSet User { get; set; } - public DbSet Presnce { get; set; } - - protected override void Conector(DbContextOptionsBuilder optionsBulder) - { - optionsBulder.UseNpgsql("Host=Localhost;" + "Port=5432;" + "Username=postgres;" + "Password=123" + "DateBase=postgres"); + public RemoteDateBaseContext() { } + + public DbSet Group { get; set; } + public DbSet User { get; set; } + public DbSet Presence { get; set; } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Username=postgres;Password=123;Database=postgres"); } - protected override void OnMode(ModelBuilder modelBulder) - { - modelBulder.Entity().HasKey(Group => Group.Id); - modelBulder.Entity().Property(Group => Group.Id).ValueGeneratedOnAdd(); - modelBulder.Entity().HasKey(User => User.Guid); - modelBulder.Entity().Property(User => User.Guid).ValueGeneratedOnAdd(); - modelBulder.Entity().HasKey(Presnce => new - { - Presnce.UserGuid, - Presnce.Date, - Presnce.IsAttendensy, - Presnce.LessonNumber + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.Entity().HasKey(group => group.Id); + modelBuilder.Entity().Property(group => group.Id).ValueGeneratedOnAdd(); + + modelBuilder.Entity().HasKey(user => user.Guid); + modelBuilder.Entity().Property(user => user.Guid).ValueGeneratedOnAdd(); + + modelBuilder.Entity().HasKey(presence => new + { + presence.UserGuid, + presence.Date, + presence.IsAttendensy, + presence.LessonNumber }); - - } - } } diff --git a/Zurnal/obj/Debug/net8.0/Zurnal.AssemblyInfo.cs b/Zurnal/obj/Debug/net8.0/Zurnal.AssemblyInfo.cs index 2c1106a..eb15329 100644 --- a/Zurnal/obj/Debug/net8.0/Zurnal.AssemblyInfo.cs +++ b/Zurnal/obj/Debug/net8.0/Zurnal.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Zurnal")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0b0ba67c4d6e7aa46dd79af691fb54877624f83f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+3c2a052a46be0d31bde662e889b1125d89b34ddf")] [assembly: System.Reflection.AssemblyProductAttribute("Zurnal")] [assembly: System.Reflection.AssemblyTitleAttribute("Zurnal")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Zurnal/obj/Debug/net8.0/Zurnal.AssemblyInfoInputs.cache b/Zurnal/obj/Debug/net8.0/Zurnal.AssemblyInfoInputs.cache index f79f4fb..c86c0e2 100644 --- a/Zurnal/obj/Debug/net8.0/Zurnal.AssemblyInfoInputs.cache +++ b/Zurnal/obj/Debug/net8.0/Zurnal.AssemblyInfoInputs.cache @@ -1 +1 @@ -f59bb23a739d4f7151c638d5a5110c130fc7789780b0a85c1d2a81cb1bef7c00 +c93eabaca987d32605ba5a086a447483e47422719e2959ace2200ffe485e77e0 diff --git a/Zurnal/obj/Release/net8.0/Zurnal.AssemblyInfo.cs b/Zurnal/obj/Release/net8.0/Zurnal.AssemblyInfo.cs index 1fed331..9a726ac 100644 --- a/Zurnal/obj/Release/net8.0/Zurnal.AssemblyInfo.cs +++ b/Zurnal/obj/Release/net8.0/Zurnal.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Zurnal")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0b0ba67c4d6e7aa46dd79af691fb54877624f83f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+3c2a052a46be0d31bde662e889b1125d89b34ddf")] [assembly: System.Reflection.AssemblyProductAttribute("Zurnal")] [assembly: System.Reflection.AssemblyTitleAttribute("Zurnal")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Zurnal/obj/Release/net8.0/Zurnal.AssemblyInfoInputs.cache b/Zurnal/obj/Release/net8.0/Zurnal.AssemblyInfoInputs.cache index b6a0358..538e8fa 100644 --- a/Zurnal/obj/Release/net8.0/Zurnal.AssemblyInfoInputs.cache +++ b/Zurnal/obj/Release/net8.0/Zurnal.AssemblyInfoInputs.cache @@ -1 +1 @@ -bc606dcbe2bf39dc1e3a0c503aefdd53e81845acaec4ab3928c13b87ae1df594 +55c651428e1762d57a0191284031a7fb9a74201885a6416185bad67726c218fd