Rhomios 2 лет назад
Родитель
Сommit
b104b51617

BIN
.vs/Reconstruction/v17/.futdcache.v1


BIN
.vs/Reconstruction/v17/.suo


+ 1 - 1
Reconstruction.sln

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 17
 VisualStudioVersion = 17.1.32210.238
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reconstruction", "Reconstruction\Reconstruction.csproj", "{3EDF3C66-3414-4010-8054-77AE1B4F9580}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Reconstruction", "Reconstruction\Reconstruction.csproj", "{3EDF3C66-3414-4010-8054-77AE1B4F9580}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution

+ 44 - 3
Reconstruction/Functions/Registration.cs

@@ -1,4 +1,6 @@
-namespace Reconstruction.Functions
+using Reconstruction.Settings;
+
+namespace Reconstruction.Functions
 {
     public static class Registration
     {
@@ -11,9 +13,48 @@
             string Password;
             string Phone;
 
-            FirstName = Convert.ToString(Console.ReadLine());
-            LastName = Convert.ToString(Console.ReadLine());
+            
+            User user = new User();
+            Console.WriteLine("Enter your first name");
+            {
+                FirstName = Convert.ToString(Console.ReadLine());
+                user.Firstname = FirstName;
+            }
+
+            Console.WriteLine("Enter your last name");
+            {
+                LastName = Convert.ToString(Console.ReadLine());
+                user.Lastname = LastName;
+            }
+
+            Console.WriteLine("Enter your middle names if you have this");
+            {
+                MiddleName = Convert.ToString(Console.ReadLine());
+                user.Middlename = MiddleName;
+            }
+
+            Console.WriteLine("Enter your login");
+            {
+                Login = Convert.ToString(Console.ReadLine());
+                user.Login = Login;
+            }
+
+            Console.WriteLine("Enter your password");
+            {
+                Password = Convert.ToString(Console.ReadLine());
+                user.Password = Password;
+            }
+
+            Console.WriteLine("Enter your phone number if you wish");
+            {
+                Phone = Convert.ToString(Console.ReadLine());
+                user.Phone = Phone;
+            }
+
+
 
+            Service.Db.Users.Add(user);
+            Service.Db.SaveChanges();
             
 
         }

BIN
Reconstruction/obj/Debug/net6.0/Reconstruction.assets.cache


BIN
Reconstruction/obj/Debug/net6.0/Reconstruction.csproj.AssemblyReference.cache