Pārlūkot izejas kodu

Restaurant Categories & Authentication

master
George Williams 4 gadus atpakaļ
vecāks
revīzija
bf2ea543a5
62 mainītis faili ar 3326 papildinājumiem un 301 dzēšanām
  1. Binārs
      .vs/ProRestaurant/DesignTimeBuild/.dtbcache.v2
  2. Binārs
      .vs/ProRestaurant/v16/.suo
  3. 7
    0
      ProRestaurant/Classes/AppSettings.cs
  4. 15
    0
      ProRestaurant/Classes/Enums.cs
  5. 64
    0
      ProRestaurant/Classes/ImageFormatter.cs
  6. 27
    0
      ProRestaurant/Containers/RestaurantContainer.cs
  7. 11
    0
      ProRestaurant/Containers/TradingHoursContainer.cs
  8. 14
    3
      ProRestaurant/Containers/UserContainer.cs
  9. 34
    0
      ProRestaurant/Controllers/Accounts/AuthenticationController.cs
  10. 56
    0
      ProRestaurant/Controllers/Accounts/RegistrationController.cs
  11. 0
    72
      ProRestaurant/Controllers/Accounts/UserController.cs
  12. 6
    0
      ProRestaurant/Controllers/Restaurants/IRestaurantCategory.cs
  13. 58
    0
      ProRestaurant/Controllers/Restaurants/RestaurantCategoryController.cs
  14. 2
    2
      ProRestaurant/Controllers/Restaurants/RestaurantController.cs
  15. 20
    5
      ProRestaurant/DBContexts/DBContext.cs
  16. 87
    4
      ProRestaurant/Migrations/20200608091919_ReInitDB.Designer.cs
  17. 79
    5
      ProRestaurant/Migrations/20200608091919_ReInitDB.cs
  18. 371
    0
      ProRestaurant/Migrations/20200608113150_001.Designer.cs
  19. 23
    0
      ProRestaurant/Migrations/20200608113150_001.cs
  20. 388
    0
      ProRestaurant/Migrations/20200608133845_002.Designer.cs
  21. 48
    0
      ProRestaurant/Migrations/20200608133845_002.cs
  22. 386
    0
      ProRestaurant/Migrations/20200608133952_003.Designer.cs
  23. 23
    0
      ProRestaurant/Migrations/20200608133952_003.cs
  24. 390
    0
      ProRestaurant/Migrations/20200609191325_004.Designer.cs
  25. 31
    0
      ProRestaurant/Migrations/20200609191325_004.cs
  26. 107
    3
      ProRestaurant/Migrations/DBContextModelSnapshot.cs
  27. 6
    2
      ProRestaurant/Models/Accounts/User.cs
  28. 2
    0
      ProRestaurant/Models/Accounts/UserAddress.cs
  29. 14
    0
      ProRestaurant/Models/Misc/Locations.cs
  30. 20
    9
      ProRestaurant/Models/Restaurants/Restaurant.cs
  31. 14
    0
      ProRestaurant/Models/Restaurants/RestaurantCategory.cs
  32. 16
    0
      ProRestaurant/Models/Restaurants/RestaurantUser.cs
  33. 2
    0
      ProRestaurant/Models/Restaurants/TradingHours.cs
  34. 3
    1
      ProRestaurant/ProRestaurant.csproj
  35. 1
    0
      ProRestaurant/ProRestaurant.csproj.user
  36. 7
    8
      ProRestaurant/Program.cs
  37. 80
    0
      ProRestaurant/Repository/Accounts/AuthenticateRepository.cs
  38. 16
    0
      ProRestaurant/Repository/Accounts/IRegistrationRepository.cs
  39. 0
    20
      ProRestaurant/Repository/Accounts/IUserRepository.cs
  40. 227
    0
      ProRestaurant/Repository/Accounts/RegistrationRepository.cs
  41. 0
    99
      ProRestaurant/Repository/Accounts/UserRepository.cs
  42. 19
    0
      ProRestaurant/Repository/Restaurants/IMenuCategoryRepository.cs
  43. 16
    0
      ProRestaurant/Repository/Restaurants/IRestaurantCategoryRepository.cs
  44. 4
    3
      ProRestaurant/Repository/Restaurants/IRestaurantRepository.cs
  45. 58
    0
      ProRestaurant/Repository/Restaurants/MenuCategoryRepository.cs
  46. 56
    0
      ProRestaurant/Repository/Restaurants/RestaurantCategoryRepository.cs
  47. 32
    3
      ProRestaurant/Repository/Restaurants/RestaurantRepository.cs
  48. 40
    2
      ProRestaurant/Startup.cs
  49. 4
    1
      ProRestaurant/appsettings.json
  50. 182
    48
      ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.deps.json
  51. Binārs
      ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.dll
  52. Binārs
      ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.pdb
  53. 4
    1
      ProRestaurant/bin/Debug/netcoreapp2.2/appsettings.json
  54. Binārs
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.assets.cache
  55. 1
    1
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csproj.CoreCompileInputs.cache
  56. 1
    1
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csproj.FileListAbsolute.txt
  57. Binārs
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csprojAssemblyReference.cache
  58. Binārs
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.dll
  59. Binārs
      ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.pdb
  60. 8
    0
      ProRestaurant/obj/ProRestaurant.csproj.nuget.dgspec.json
  61. 240
    6
      ProRestaurant/obj/project.assets.json
  62. 6
    2
      ProRestaurant/obj/project.nuget.cache

Binārs
.vs/ProRestaurant/DesignTimeBuild/.dtbcache.v2 Parādīt failu


Binārs
.vs/ProRestaurant/v16/.suo Parādīt failu


+ 7
- 0
ProRestaurant/Classes/AppSettings.cs Parādīt failu

1
+namespace ProRestaurant.Classes
2
+{
3
+    public class AppSettings
4
+    {
5
+        public string Secret { get; set; }
6
+    }
7
+}

+ 15
- 0
ProRestaurant/Classes/Enums.cs Parādīt failu

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Threading.Tasks;
5
+
6
+namespace ProRestaurant.Classes
7
+{
8
+    public enum SystemRole
9
+    {
10
+        SuperAdmin,
11
+        RestaurantAdmin,
12
+        RestaurantUser,        
13
+        Customer
14
+    }
15
+}

+ 64
- 0
ProRestaurant/Classes/ImageFormatter.cs Parādīt failu

1
+using System;
2
+using System.Drawing;
3
+using System.IO;
4
+
5
+namespace ProRestaurant.Classes
6
+{
7
+    public class ImageFormatter
8
+    {
9
+        public static string Base64ToImage(string binData, string path, string name)
10
+        {
11
+            string extention = ".jpg";
12
+            if (binData.StartsWith("data:image/gif;base64,"))
13
+            {
14
+                extention = ".gif";
15
+                binData = binData.Replace("data:image/gif;base64,", "");
16
+            }
17
+            if (binData.StartsWith("data:image/jpeg;base64,"))
18
+            {
19
+                extention = ".jpg";
20
+                binData = binData.Replace("data:image/jpeg;base64,", "");
21
+            }
22
+            if (binData.StartsWith("data:image/png;base64,"))
23
+            {
24
+                extention = ".png";
25
+                binData = binData.Replace("data:image/png;base64,", "");
26
+            }
27
+
28
+            if (!Directory.Exists(path))
29
+                Directory.CreateDirectory(path);
30
+
31
+            string filePath = string.Format(@"{0}\{1}{2}", path, name, extention);
32
+            File.WriteAllBytes(filePath, Convert.FromBase64String(binData));
33
+            return filePath;
34
+        }
35
+
36
+        public static string ImageToBase64(string Path)
37
+        {
38
+            if (File.Exists(Path))
39
+            {
40
+                using (Image image = Image.FromFile(Path))
41
+                {
42
+                    using (MemoryStream m = new MemoryStream())
43
+                    {
44
+                        image.Save(m, image.RawFormat);
45
+                        byte[] imageBytes = m.ToArray();
46
+
47
+                        string base64String = Convert.ToBase64String(imageBytes);
48
+
49
+                        if (Path.EndsWith(".jpg") || Path.EndsWith(".jpeg"))
50
+                            base64String = "data:image/jpeg;base64," + base64String;
51
+                        if (Path.EndsWith(".gif"))
52
+                            base64String = "data:image/gif;base64," + base64String;
53
+                        if (base64String.EndsWith(".png"))
54
+                            base64String = "data:image/png;base64," + base64String;
55
+
56
+                        return base64String;
57
+                    }
58
+                }
59
+            }
60
+            else
61
+                return "";
62
+        }
63
+    }
64
+}

+ 27
- 0
ProRestaurant/Containers/RestaurantContainer.cs Parādīt failu

1
+using ProRestaurant.Models.Restaurants;
2
+using System.Collections.Generic;
3
+
4
+namespace ProRestaurant.Containers
5
+{
6
+    public class RestaurantContainer : Restaurant
7
+    {
8
+        public string UserFirstName { get; set; }
9
+        public string UserSurname { get; set; }        
10
+        public string UserEmailAddress { get; set; }
11
+        public string UserPassword { get; set; }
12
+
13
+        public List<TradingHoursContainer> THours { get; set; }        
14
+        public string Result { get; set; }        
15
+    }
16
+
17
+    public class RestaurantCard
18
+    {
19
+        public int Id { get; set; }
20
+        public string Logo { get; set; }
21
+        public string Name { get; set; }
22
+        public string Suburb { get; set; }
23
+        public string SubText { get; set; }
24
+        public string DeliveryTime { get; set; }
25
+        public string DeliveryFee { get; set; }
26
+    }
27
+}

+ 11
- 0
ProRestaurant/Containers/TradingHoursContainer.cs Parādīt failu

1
+namespace ProRestaurant.Containers
2
+{
3
+    public class TradingHoursContainer
4
+    {
5
+        public string Description { get; set; }
6
+        public string From { get; set; }
7
+        public string To { get; set; }
8
+        public bool Closed { get; set; }
9
+        public bool Open24 { get; set; }
10
+    }
11
+}

+ 14
- 3
ProRestaurant/Containers/UserContainer.cs Parādīt failu

2
 
2
 
3
 namespace ProRestaurant.Containers
3
 namespace ProRestaurant.Containers
4
 {
4
 {
5
-    public class UserContainer 
5
+    public class UserContainer : User
6
     {
6
     {
7
-        public string ResultString { get; set; }
8
-        public User user { get; set; }
7
+        public string ResultString { get; set; }       
8
+    }
9
+
10
+    public class AuthenticationContiner
11
+    {        
12
+        public int ID { get; set; }
13
+        public string Name { get; set; }
14
+        public string Surname { get; set; }
15
+        public string EmailAddress { get; set; }
16
+        public string Password { get; set; }
17
+        public string Role { get; set; }
18
+        public string Result { get; set; }
19
+        public string Token { get; set; }
9
     }
20
     }
10
 }
21
 }

+ 34
- 0
ProRestaurant/Controllers/Accounts/AuthenticationController.cs Parādīt failu

1
+
2
+using Microsoft.AspNetCore.Mvc;
3
+using ProRestaurant.Containers;
4
+using ProRestaurant.Repository.Accounts;
5
+
6
+namespace ProRestaurant.Controllers.Accounts
7
+{
8
+    [Route("api/[controller]")]
9
+    [ApiController]
10
+    public class AuthenticationController : ControllerBase
11
+    {
12
+        private IAuthenticateRepository repo;
13
+        public AuthenticationController(IAuthenticateRepository Repo)
14
+        {
15
+            repo = Repo;
16
+        }
17
+
18
+        [HttpGet]
19
+        public IActionResult Get()
20
+        {
21
+            return new OkObjectResult(repo.GetAuthenticationContiner());
22
+        }       
23
+        
24
+        [HttpPost("authenticate")]
25
+        public IActionResult Authenticate([FromBody] AuthenticationContiner User)
26
+        {
27
+            var user = repo.Login(User);
28
+            if (user.Result != "Access Granted")
29
+                return BadRequest(new { message = user.Result });
30
+
31
+            return Ok(user);
32
+        }        
33
+    }
34
+}

+ 56
- 0
ProRestaurant/Controllers/Accounts/RegistrationController.cs Parādīt failu

1
+using Microsoft.AspNetCore.Mvc;
2
+using ProRestaurant.Containers;
3
+using ProRestaurant.Repository.Accounts;
4
+using System.Transactions;
5
+
6
+
7
+namespace ProRestaurant.Controllers.Accounts
8
+{
9
+    [Route("api/[controller]")]
10
+    [ApiController]
11
+    public class RegistrationController : ControllerBase
12
+    {
13
+        private readonly IRegistrationRepository regRepository;
14
+
15
+        public RegistrationController(IRegistrationRepository regRepo)
16
+        {
17
+            regRepository = regRepo;
18
+        }               
19
+
20
+        [HttpGet("GetUserContainer")]
21
+        public IActionResult GetUserContainer()
22
+        {
23
+            var userContainer = regRepository.GetUserContainer();
24
+            return new OkObjectResult(userContainer);
25
+        }
26
+
27
+        [HttpGet("GetRestaurantContainer")]
28
+        public IActionResult GetRestaurantContainer()
29
+        {
30
+            var container = regRepository.GetRestaurantContainer();
31
+            return new OkObjectResult(container);
32
+        }        
33
+
34
+        [HttpPost("resgisterRestaurant")]
35
+        public IActionResult ResgisterRestaurant([FromBody] RestaurantContainer container)
36
+        {
37
+            using (var scope = new TransactionScope())
38
+            {
39
+                regRepository.RegisterRestaurant(container);
40
+                scope.Complete();
41
+                return new OkObjectResult(container);                
42
+            }
43
+        }
44
+
45
+        [HttpPost("resgisterUser")]
46
+        public IActionResult ResgisterUser([FromBody] UserContainer container)
47
+        {
48
+            using (var scope = new TransactionScope())
49
+            {
50
+                regRepository.RegisterUser(container);
51
+                scope.Complete();                
52
+                return new OkObjectResult(container);
53
+            }
54
+        }
55
+    }
56
+}

+ 0
- 72
ProRestaurant/Controllers/Accounts/UserController.cs Parādīt failu

1
-using Microsoft.AspNetCore.Mvc;
2
-using ProRestaurant.Models.Accounts;
3
-using ProRestaurant.Repository.Accounts;
4
-using System.Transactions;
5
-
6
-
7
-namespace ProRestaurant.Controllers.Accounts
8
-{
9
-    [Route("api/[controller]")]
10
-    [ApiController]
11
-    public class UserController : ControllerBase
12
-    {
13
-        private readonly IUserRepository userRepository;
14
-
15
-        public UserController(IUserRepository userRepo)
16
-        {
17
-            userRepository = userRepo;
18
-        }
19
-        
20
-        [HttpGet]
21
-        public IActionResult Get()
22
-        {
23
-            return new OkObjectResult(userRepository.GetUsers());
24
-        }
25
-        
26
-        [HttpGet("{id}")]
27
-        public IActionResult Get(int id)
28
-        {
29
-            var user = userRepository.GetUser(u => u.Id == id);
30
-            return new OkObjectResult(user);
31
-        }
32
-
33
-        [HttpGet("Login/{username}/{password}")]
34
-        public IActionResult Login(string username, string password)
35
-        {
36
-            return new OkObjectResult(userRepository.Login(username, password));
37
-        }
38
-        
39
-        [HttpPost]
40
-        public IActionResult Post([FromBody] User user)
41
-        {
42
-            using (var scope = new TransactionScope())
43
-            {
44
-                userRepository.Insert(user);
45
-                scope.Complete();
46
-                return CreatedAtAction(nameof(Get), new { id = user.Id }, user);
47
-            }
48
-        }
49
-        
50
-        [HttpPut]
51
-        public IActionResult Put([FromBody] User user)
52
-        {
53
-            if (user != null)
54
-            {
55
-                using (var scope = new TransactionScope())
56
-                {
57
-                    userRepository.Update(user);
58
-                    scope.Complete();
59
-                    return new OkResult();
60
-                }
61
-            }
62
-            return new NoContentResult();
63
-        }
64
-        
65
-        [HttpDelete("{id}")]
66
-        public IActionResult Delete(int id)
67
-        {
68
-            userRepository.Remove(userRepository.GetUser(u => u.Id == id));
69
-            return new OkResult();
70
-        }
71
-    }
72
-}

+ 6
- 0
ProRestaurant/Controllers/Restaurants/IRestaurantCategory.cs Parādīt failu

1
+namespace ProRestaurant.Controllers.Restaurants
2
+{
3
+    internal interface IRestaurantCategory
4
+    {
5
+    }
6
+}

+ 58
- 0
ProRestaurant/Controllers/Restaurants/RestaurantCategoryController.cs Parādīt failu

1
+using Microsoft.AspNetCore.Mvc;
2
+using ProRestaurant.Models.Restaurants;
3
+using ProRestaurant.Repository.Restaurants;
4
+using System.Transactions;
5
+
6
+namespace ProRestaurant.Controllers.Restaurants
7
+{
8
+    [Route("api/[controller]")]
9
+    [ApiController]
10
+    public class RestaurantCategoryController : Controller
11
+    {
12
+        private readonly IRestaurantCategoryRepository repo; 
13
+
14
+        public RestaurantCategoryController(IRestaurantCategoryRepository Repo)
15
+        {
16
+            repo = Repo;
17
+        }
18
+
19
+        [HttpGet]
20
+        public IActionResult Get()
21
+        {
22
+            return new OkObjectResult(repo.Get());
23
+        }
24
+
25
+        [HttpPost]
26
+        public IActionResult Post([FromBody] RestaurantCategory category)
27
+        {
28
+            using (var scope = new TransactionScope())
29
+            {
30
+                repo.Insert(category);
31
+                scope.Complete();
32
+                return new OkObjectResult(category);
33
+            }
34
+        }
35
+
36
+        [HttpPut]
37
+        public IActionResult Put([FromBody] RestaurantCategory category)
38
+        {
39
+            if (category != null)
40
+            {
41
+                using (var scope = new TransactionScope())
42
+                {
43
+                    repo.Update(category);
44
+                    scope.Complete();
45
+                    return new OkResult();
46
+                }
47
+            }
48
+            return new NoContentResult();
49
+        }
50
+
51
+        [HttpDelete("{id}")]
52
+        public IActionResult Delete(int id)
53
+        {            
54
+            repo.Remove(id);
55
+            return new OkResult();
56
+        }
57
+    }
58
+}

+ 2
- 2
ProRestaurant/Controllers/Restaurants/RestaurantController.cs Parādīt failu

19
         [HttpGet]
19
         [HttpGet]
20
         public IActionResult Get()
20
         public IActionResult Get()
21
         {
21
         {
22
-            return new OkObjectResult(repo.GetUsers());
22
+            return new OkObjectResult(repo.GetSearch());
23
         }
23
         }
24
 
24
 
25
         [HttpGet("{id}")]
25
         [HttpGet("{id}")]
27
         {
27
         {
28
             var restaurant = repo.GetRestaurant(u => u.Id == id);
28
             var restaurant = repo.GetRestaurant(u => u.Id == id);
29
             return new OkObjectResult(restaurant);
29
             return new OkObjectResult(restaurant);
30
-        }
30
+        }        
31
 
31
 
32
         [HttpPost]
32
         [HttpPost]
33
         public IActionResult Post([FromBody] Restaurant restaurant)
33
         public IActionResult Post([FromBody] Restaurant restaurant)

+ 20
- 5
ProRestaurant/DBContexts/DBContext.cs Parādīt failu

1
-using Microsoft.EntityFrameworkCore;
1
+using Microsoft.CodeAnalysis;
2
+using Microsoft.EntityFrameworkCore;
2
 using Npgsql;
3
 using Npgsql;
3
 using ProRestaurant.Models;
4
 using ProRestaurant.Models;
4
 using ProRestaurant.Models.Accounts;
5
 using ProRestaurant.Models.Accounts;
6
+using ProRestaurant.Models.Misc;
5
 using ProRestaurant.Models.Restaurants;
7
 using ProRestaurant.Models.Restaurants;
6
 using System.Data.SqlClient;
8
 using System.Data.SqlClient;
7
 using System.Linq;
9
 using System.Linq;
41
         public DbSet<TradingHours> TradingHours { get; set; }
43
         public DbSet<TradingHours> TradingHours { get; set; }
42
         public DbSet<MenuCategory> MenuCategories { get; set; }
44
         public DbSet<MenuCategory> MenuCategories { get; set; }
43
         public DbSet<MenuItem> MenuItems { get; set; }
45
         public DbSet<MenuItem> MenuItems { get; set; }
44
-        #endregion 
46
+        public DbSet<RestaurantUser> RestaurantUsers { get; set; }
47
+        public DbSet<RestaurantCategory> RestaurantCategories { get; set; }
48
+        #endregion
49
+
50
+        #region Misc
51
+        public DbSet<Locations> Locations { get; set; }
52
+        #endregion
45
 
53
 
46
         public override int SaveChanges()
54
         public override int SaveChanges()
47
         {
55
         {
56
+            bool isBaseObject = false;
48
             foreach (var item in ChangeTracker
57
             foreach (var item in ChangeTracker
49
                                     .Entries()
58
                                     .Entries()
50
                                     .Where(x => x.State == EntityState.Modified || x.State == EntityState.Added)
59
                                     .Where(x => x.State == EntityState.Modified || x.State == EntityState.Added)
53
             {
62
             {
54
                 if (item is BaseObject)
63
                 if (item is BaseObject)
55
                 {
64
                 {
65
+                    isBaseObject = true;
56
                     (item as BaseObject).UpdateModified(string.Empty);
66
                     (item as BaseObject).UpdateModified(string.Empty);
57
                 }
67
                 }
58
             }
68
             }
59
-            UpdateSoftDeleteStatuses();
69
+            if (isBaseObject)
70
+                UpdateSoftDeleteStatuses();
71
+
60
             return base.SaveChanges();
72
             return base.SaveChanges();
61
         }
73
         }
62
 
74
 
63
         private void UpdateSoftDeleteStatuses()
75
         private void UpdateSoftDeleteStatuses()
64
-        {
76
+        {            
65
             foreach (var entry in ChangeTracker.Entries())
77
             foreach (var entry in ChangeTracker.Entries())
66
-            {
78
+            {                
67
                 switch (entry.State)
79
                 switch (entry.State)
68
                 {
80
                 {
69
                     case EntityState.Added:
81
                     case EntityState.Added:
84
             modelBuilder.Entity<DriverDetail>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
96
             modelBuilder.Entity<DriverDetail>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
85
             modelBuilder.Entity<Restaurant>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
97
             modelBuilder.Entity<Restaurant>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
86
             modelBuilder.Entity<TradingHours>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
98
             modelBuilder.Entity<TradingHours>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
99
+            modelBuilder.Entity<MenuCategory>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
100
+            modelBuilder.Entity<MenuItem>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);
101
+            modelBuilder.Entity<RestaurantUser>().HasQueryFilter(m => EF.Property<bool>(m, "IsDeleted") == false);            
87
         }
102
         }
88
 
103
 
89
         public int GetNextID(string tableName)
104
         public int GetNextID(string tableName)

ProRestaurant/Migrations/20200526094220_initialCreate.Designer.cs → ProRestaurant/Migrations/20200608091919_ReInitDB.Designer.cs Parādīt failu

10
 namespace ProRestaurant.Migrations
10
 namespace ProRestaurant.Migrations
11
 {
11
 {
12
     [DbContext(typeof(DBContext))]
12
     [DbContext(typeof(DBContext))]
13
-    [Migration("20200526094220_initialCreate")]
14
-    partial class initialCreate
13
+    [Migration("20200608091919_ReInitDB")]
14
+    partial class ReInitDB
15
     {
15
     {
16
         protected override void BuildTargetModel(ModelBuilder modelBuilder)
16
         protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
         {
17
         {
73
 
73
 
74
                     b.Property<string>("Surname");
74
                     b.Property<string>("Surname");
75
 
75
 
76
+                    b.Property<int>("SystemRole");
77
+
76
                     b.HasKey("Id");
78
                     b.HasKey("Id");
77
 
79
 
78
                     b.ToTable("Users");
80
                     b.ToTable("Users");
92
 
94
 
93
                     b.Property<DateTime>("Created");
95
                     b.Property<DateTime>("Created");
94
 
96
 
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
95
                     b.Property<bool>("IsDeleted");
101
                     b.Property<bool>("IsDeleted");
96
 
102
 
97
                     b.Property<decimal>("Latitude");
103
                     b.Property<decimal>("Latitude");
123
                     b.ToTable("UserAddresses");
129
                     b.ToTable("UserAddresses");
124
                 });
130
                 });
125
 
131
 
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
126
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
145
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
127
                 {
146
                 {
128
                     b.Property<int>("Id")
147
                     b.Property<int>("Id")
187
 
206
 
188
                     b.Property<bool>("Chain");
207
                     b.Property<bool>("Chain");
189
 
208
 
209
+                    b.Property<string>("City");
210
+
211
+                    b.Property<string>("Country");
212
+
190
                     b.Property<DateTime>("Created");
213
                     b.Property<DateTime>("Created");
191
 
214
 
192
                     b.Property<decimal>("DeliveryFee");
215
                     b.Property<decimal>("DeliveryFee");
193
 
216
 
194
                     b.Property<decimal>("DeliveryRadius");
217
                     b.Property<decimal>("DeliveryRadius");
195
 
218
 
219
+                    b.Property<string>("GoogleMapUrl");
220
+
196
                     b.Property<bool>("IsDeleted");
221
                     b.Property<bool>("IsDeleted");
197
 
222
 
198
-                    b.Property<string>("Location");
223
+                    b.Property<decimal>("Latitude");
199
 
224
 
200
                     b.Property<string>("Logo");
225
                     b.Property<string>("Logo");
201
 
226
 
227
+                    b.Property<decimal>("Longitude");
228
+
202
                     b.Property<string>("MethodsOfPayment");
229
                     b.Property<string>("MethodsOfPayment");
203
 
230
 
204
                     b.Property<DateTime>("Modified");
231
                     b.Property<DateTime>("Modified");
207
 
234
 
208
                     b.Property<string>("Name");
235
                     b.Property<string>("Name");
209
 
236
 
237
+                    b.Property<string>("PostalCode");
238
+
239
+                    b.Property<string>("Provice");
240
+
241
+                    b.Property<string>("ShopNumber");
242
+
243
+                    b.Property<string>("ShoppingCentre");
244
+
245
+                    b.Property<string>("StreetName");
246
+
247
+                    b.Property<string>("StreetNumber");
248
+
249
+                    b.Property<string>("Suburb");
250
+
210
                     b.HasKey("Id");
251
                     b.HasKey("Id");
211
 
252
 
212
                     b.ToTable("Restaurants");
253
                     b.ToTable("Restaurants");
213
                 });
254
                 });
214
 
255
 
256
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
257
+                {
258
+                    b.Property<int>("Id")
259
+                        .ValueGeneratedOnAdd()
260
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
261
+
262
+                    b.Property<DateTime>("Created");
263
+
264
+                    b.Property<bool>("IsDeleted");
265
+
266
+                    b.Property<DateTime>("Modified");
267
+
268
+                    b.Property<string>("ModifiedBy");
269
+
270
+                    b.Property<int>("RestaurantId");
271
+
272
+                    b.Property<int>("UserId");
273
+
274
+                    b.HasKey("Id");
275
+
276
+                    b.HasIndex("RestaurantId");
277
+
278
+                    b.HasIndex("UserId");
279
+
280
+                    b.ToTable("RestaurantUsers");
281
+                });
282
+
215
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
283
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
216
                 {
284
                 {
217
                     b.Property<int>("Id")
285
                     b.Property<int>("Id")
218
                         .ValueGeneratedOnAdd()
286
                         .ValueGeneratedOnAdd()
219
                         .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
287
                         .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
220
 
288
 
289
+                    b.Property<bool>("Closed");
290
+
221
                     b.Property<DateTime>("ClosingTime");
291
                     b.Property<DateTime>("ClosingTime");
222
 
292
 
223
                     b.Property<DateTime>("Created");
293
                     b.Property<DateTime>("Created");
252
             modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
322
             modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
253
                 {
323
                 {
254
                     b.HasOne("ProRestaurant.Models.Accounts.User", "User")
324
                     b.HasOne("ProRestaurant.Models.Accounts.User", "User")
255
-                        .WithMany()
325
+                        .WithMany("Addresses")
256
                         .HasForeignKey("UserId")
326
                         .HasForeignKey("UserId")
257
                         .OnDelete(DeleteBehavior.Cascade);
327
                         .OnDelete(DeleteBehavior.Cascade);
258
                 });
328
                 });
273
                         .OnDelete(DeleteBehavior.Cascade);
343
                         .OnDelete(DeleteBehavior.Cascade);
274
                 });
344
                 });
275
 
345
 
346
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
347
+                {
348
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
349
+                        .WithMany("Users")
350
+                        .HasForeignKey("RestaurantId")
351
+                        .OnDelete(DeleteBehavior.Cascade);
352
+
353
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
354
+                        .WithMany()
355
+                        .HasForeignKey("UserId")
356
+                        .OnDelete(DeleteBehavior.Cascade);
357
+                });
358
+
276
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
359
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
277
                 {
360
                 {
278
                     b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
361
                     b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")

ProRestaurant/Migrations/20200526094220_initialCreate.cs → ProRestaurant/Migrations/20200608091919_ReInitDB.cs Parādīt failu

4
 
4
 
5
 namespace ProRestaurant.Migrations
5
 namespace ProRestaurant.Migrations
6
 {
6
 {
7
-    public partial class initialCreate : Migration
7
+    public partial class ReInitDB : Migration
8
     {
8
     {
9
         protected override void Up(MigrationBuilder migrationBuilder)
9
         protected override void Up(MigrationBuilder migrationBuilder)
10
         {
10
         {
11
+            migrationBuilder.CreateTable(
12
+                name: "Locations",
13
+                columns: table => new
14
+                {
15
+                    Id = table.Column<int>(nullable: false)
16
+                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
17
+                    ImageStore = table.Column<string>(nullable: true)
18
+                },
19
+                constraints: table =>
20
+                {
21
+                    table.PrimaryKey("PK_Locations", x => x.Id);
22
+                });
23
+
11
             migrationBuilder.CreateTable(
24
             migrationBuilder.CreateTable(
12
                 name: "Restaurants",
25
                 name: "Restaurants",
13
                 columns: table => new
26
                 columns: table => new
19
                     ModifiedBy = table.Column<string>(nullable: true),
32
                     ModifiedBy = table.Column<string>(nullable: true),
20
                     IsDeleted = table.Column<bool>(nullable: false),
33
                     IsDeleted = table.Column<bool>(nullable: false),
21
                     Name = table.Column<string>(nullable: true),
34
                     Name = table.Column<string>(nullable: true),
22
-                    Location = table.Column<string>(nullable: true),
23
                     Logo = table.Column<string>(nullable: true),
35
                     Logo = table.Column<string>(nullable: true),
24
                     Chain = table.Column<bool>(nullable: false),
36
                     Chain = table.Column<bool>(nullable: false),
25
                     DeliveryFee = table.Column<decimal>(nullable: false),
37
                     DeliveryFee = table.Column<decimal>(nullable: false),
26
                     DeliveryRadius = table.Column<decimal>(nullable: false),
38
                     DeliveryRadius = table.Column<decimal>(nullable: false),
27
-                    MethodsOfPayment = table.Column<string>(nullable: true)
39
+                    MethodsOfPayment = table.Column<string>(nullable: true),
40
+                    ShoppingCentre = table.Column<string>(nullable: true),
41
+                    ShopNumber = table.Column<string>(nullable: true),
42
+                    GoogleMapUrl = table.Column<string>(nullable: true),
43
+                    Latitude = table.Column<decimal>(nullable: false),
44
+                    Longitude = table.Column<decimal>(nullable: false),
45
+                    StreetNumber = table.Column<string>(nullable: true),
46
+                    StreetName = table.Column<string>(nullable: true),
47
+                    Suburb = table.Column<string>(nullable: true),
48
+                    City = table.Column<string>(nullable: true),
49
+                    Provice = table.Column<string>(nullable: true),
50
+                    Country = table.Column<string>(nullable: true),
51
+                    PostalCode = table.Column<string>(nullable: true)
28
                 },
52
                 },
29
                 constraints: table =>
53
                 constraints: table =>
30
                 {
54
                 {
45
                     Password = table.Column<string>(nullable: true),
69
                     Password = table.Column<string>(nullable: true),
46
                     FirstName = table.Column<string>(nullable: true),
70
                     FirstName = table.Column<string>(nullable: true),
47
                     Surname = table.Column<string>(nullable: true),
71
                     Surname = table.Column<string>(nullable: true),
48
-                    Cellphone = table.Column<string>(nullable: true)
72
+                    Cellphone = table.Column<string>(nullable: true),
73
+                    SystemRole = table.Column<int>(nullable: false)
49
                 },
74
                 },
50
                 constraints: table =>
75
                 constraints: table =>
51
                 {
76
                 {
116
                     RestaurantId = table.Column<int>(nullable: false),
141
                     RestaurantId = table.Column<int>(nullable: false),
117
                     Description = table.Column<string>(nullable: true),
142
                     Description = table.Column<string>(nullable: true),
118
                     OpeningTime = table.Column<DateTime>(nullable: false),
143
                     OpeningTime = table.Column<DateTime>(nullable: false),
119
-                    ClosingTime = table.Column<DateTime>(nullable: false)
144
+                    ClosingTime = table.Column<DateTime>(nullable: false),
145
+                    Closed = table.Column<bool>(nullable: false)
120
                 },
146
                 },
121
                 constraints: table =>
147
                 constraints: table =>
122
                 {
148
                 {
154
                         onDelete: ReferentialAction.Cascade);
180
                         onDelete: ReferentialAction.Cascade);
155
                 });
181
                 });
156
 
182
 
183
+            migrationBuilder.CreateTable(
184
+                name: "RestaurantUsers",
185
+                columns: table => new
186
+                {
187
+                    Id = table.Column<int>(nullable: false)
188
+                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
189
+                    Created = table.Column<DateTime>(nullable: false),
190
+                    Modified = table.Column<DateTime>(nullable: false),
191
+                    ModifiedBy = table.Column<string>(nullable: true),
192
+                    IsDeleted = table.Column<bool>(nullable: false),
193
+                    UserId = table.Column<int>(nullable: false),
194
+                    RestaurantId = table.Column<int>(nullable: false)
195
+                },
196
+                constraints: table =>
197
+                {
198
+                    table.PrimaryKey("PK_RestaurantUsers", x => x.Id);
199
+                    table.ForeignKey(
200
+                        name: "FK_RestaurantUsers_Restaurants_RestaurantId",
201
+                        column: x => x.RestaurantId,
202
+                        principalTable: "Restaurants",
203
+                        principalColumn: "Id",
204
+                        onDelete: ReferentialAction.Cascade);
205
+                    table.ForeignKey(
206
+                        name: "FK_RestaurantUsers_Users_UserId",
207
+                        column: x => x.UserId,
208
+                        principalTable: "Users",
209
+                        principalColumn: "Id",
210
+                        onDelete: ReferentialAction.Cascade);
211
+                });
212
+
157
             migrationBuilder.CreateTable(
213
             migrationBuilder.CreateTable(
158
                 name: "UserAddresses",
214
                 name: "UserAddresses",
159
                 columns: table => new
215
                 columns: table => new
165
                     ModifiedBy = table.Column<string>(nullable: true),
221
                     ModifiedBy = table.Column<string>(nullable: true),
166
                     IsDeleted = table.Column<bool>(nullable: false),
222
                     IsDeleted = table.Column<bool>(nullable: false),
167
                     UserId = table.Column<int>(nullable: false),
223
                     UserId = table.Column<int>(nullable: false),
224
+                    IsDefault = table.Column<bool>(nullable: false),
225
+                    GoogleMapUrl = table.Column<string>(nullable: true),
168
                     Latitude = table.Column<decimal>(nullable: false),
226
                     Latitude = table.Column<decimal>(nullable: false),
169
                     Longitude = table.Column<decimal>(nullable: false),
227
                     Longitude = table.Column<decimal>(nullable: false),
170
                     UnitNumber = table.Column<string>(nullable: true),
228
                     UnitNumber = table.Column<string>(nullable: true),
204
                 table: "MenuItems",
262
                 table: "MenuItems",
205
                 column: "RestaurantId");
263
                 column: "RestaurantId");
206
 
264
 
265
+            migrationBuilder.CreateIndex(
266
+                name: "IX_RestaurantUsers_RestaurantId",
267
+                table: "RestaurantUsers",
268
+                column: "RestaurantId");
269
+
270
+            migrationBuilder.CreateIndex(
271
+                name: "IX_RestaurantUsers_UserId",
272
+                table: "RestaurantUsers",
273
+                column: "UserId");
274
+
207
             migrationBuilder.CreateIndex(
275
             migrationBuilder.CreateIndex(
208
                 name: "IX_TradingHours_RestaurantId",
276
                 name: "IX_TradingHours_RestaurantId",
209
                 table: "TradingHours",
277
                 table: "TradingHours",
220
             migrationBuilder.DropTable(
288
             migrationBuilder.DropTable(
221
                 name: "DriverDetails");
289
                 name: "DriverDetails");
222
 
290
 
291
+            migrationBuilder.DropTable(
292
+                name: "Locations");
293
+
223
             migrationBuilder.DropTable(
294
             migrationBuilder.DropTable(
224
                 name: "MenuCategories");
295
                 name: "MenuCategories");
225
 
296
 
226
             migrationBuilder.DropTable(
297
             migrationBuilder.DropTable(
227
                 name: "MenuItems");
298
                 name: "MenuItems");
228
 
299
 
300
+            migrationBuilder.DropTable(
301
+                name: "RestaurantUsers");
302
+
229
             migrationBuilder.DropTable(
303
             migrationBuilder.DropTable(
230
                 name: "TradingHours");
304
                 name: "TradingHours");
231
 
305
 

+ 371
- 0
ProRestaurant/Migrations/20200608113150_001.Designer.cs Parādīt failu

1
+// <auto-generated />
2
+using System;
3
+using Microsoft.EntityFrameworkCore;
4
+using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
6
+using Microsoft.EntityFrameworkCore.Migrations;
7
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8
+using ProRestaurant.DBContexts;
9
+
10
+namespace ProRestaurant.Migrations
11
+{
12
+    [DbContext(typeof(DBContext))]
13
+    [Migration("20200608113150_001")]
14
+    partial class _001
15
+    {
16
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
+        {
18
+#pragma warning disable 612, 618
19
+            modelBuilder
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
22
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23
+
24
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
25
+                {
26
+                    b.Property<int>("Id")
27
+                        .ValueGeneratedOnAdd()
28
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
29
+
30
+                    b.Property<DateTime>("Created");
31
+
32
+                    b.Property<bool>("IsDeleted");
33
+
34
+                    b.Property<DateTime>("Modified");
35
+
36
+                    b.Property<string>("ModifiedBy");
37
+
38
+                    b.Property<string>("Photo");
39
+
40
+                    b.Property<string>("RegistrationNumber");
41
+
42
+                    b.Property<int>("UserId");
43
+
44
+                    b.HasKey("Id");
45
+
46
+                    b.HasIndex("UserId")
47
+                        .IsUnique();
48
+
49
+                    b.ToTable("DriverDetails");
50
+                });
51
+
52
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.User", b =>
53
+                {
54
+                    b.Property<int>("Id")
55
+                        .ValueGeneratedOnAdd()
56
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
57
+
58
+                    b.Property<string>("Cellphone");
59
+
60
+                    b.Property<DateTime>("Created");
61
+
62
+                    b.Property<string>("EmailAddress");
63
+
64
+                    b.Property<string>("FirstName");
65
+
66
+                    b.Property<bool>("IsDeleted");
67
+
68
+                    b.Property<DateTime>("Modified");
69
+
70
+                    b.Property<string>("ModifiedBy");
71
+
72
+                    b.Property<string>("Password");
73
+
74
+                    b.Property<string>("Surname");
75
+
76
+                    b.Property<int>("SystemRole");
77
+
78
+                    b.HasKey("Id");
79
+
80
+                    b.ToTable("Users");
81
+                });
82
+
83
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
84
+                {
85
+                    b.Property<int>("Id")
86
+                        .ValueGeneratedOnAdd()
87
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
88
+
89
+                    b.Property<string>("City");
90
+
91
+                    b.Property<string>("ComplexName");
92
+
93
+                    b.Property<string>("Country");
94
+
95
+                    b.Property<DateTime>("Created");
96
+
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
101
+                    b.Property<bool>("IsDeleted");
102
+
103
+                    b.Property<decimal>("Latitude");
104
+
105
+                    b.Property<decimal>("Longitude");
106
+
107
+                    b.Property<DateTime>("Modified");
108
+
109
+                    b.Property<string>("ModifiedBy");
110
+
111
+                    b.Property<string>("PostalCode");
112
+
113
+                    b.Property<string>("Provice");
114
+
115
+                    b.Property<string>("SteetNumber");
116
+
117
+                    b.Property<string>("StreetName");
118
+
119
+                    b.Property<string>("Suburb");
120
+
121
+                    b.Property<string>("UnitNumber");
122
+
123
+                    b.Property<int>("UserId");
124
+
125
+                    b.HasKey("Id");
126
+
127
+                    b.HasIndex("UserId");
128
+
129
+                    b.ToTable("UserAddresses");
130
+                });
131
+
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
145
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
146
+                {
147
+                    b.Property<int>("Id")
148
+                        .ValueGeneratedOnAdd()
149
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
150
+
151
+                    b.Property<DateTime>("Created");
152
+
153
+                    b.Property<string>("Description");
154
+
155
+                    b.Property<bool>("IsDeleted");
156
+
157
+                    b.Property<DateTime>("Modified");
158
+
159
+                    b.Property<string>("ModifiedBy");
160
+
161
+                    b.Property<int>("RestaurantId");
162
+
163
+                    b.HasKey("Id");
164
+
165
+                    b.HasIndex("RestaurantId");
166
+
167
+                    b.ToTable("MenuCategories");
168
+                });
169
+
170
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
171
+                {
172
+                    b.Property<int>("Id")
173
+                        .ValueGeneratedOnAdd()
174
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
175
+
176
+                    b.Property<int>("CategoryId");
177
+
178
+                    b.Property<DateTime>("Created");
179
+
180
+                    b.Property<string>("Description");
181
+
182
+                    b.Property<string>("Image");
183
+
184
+                    b.Property<bool>("IsDeleted");
185
+
186
+                    b.Property<DateTime>("Modified");
187
+
188
+                    b.Property<string>("ModifiedBy");
189
+
190
+                    b.Property<decimal>("Price");
191
+
192
+                    b.Property<int>("RestaurantId");
193
+
194
+                    b.HasKey("Id");
195
+
196
+                    b.HasIndex("RestaurantId");
197
+
198
+                    b.ToTable("MenuItems");
199
+                });
200
+
201
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
202
+                {
203
+                    b.Property<int>("Id")
204
+                        .ValueGeneratedOnAdd()
205
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
206
+
207
+                    b.Property<bool>("Chain");
208
+
209
+                    b.Property<string>("City");
210
+
211
+                    b.Property<string>("Country");
212
+
213
+                    b.Property<DateTime>("Created");
214
+
215
+                    b.Property<decimal>("DeliveryFee");
216
+
217
+                    b.Property<decimal>("DeliveryRadius");
218
+
219
+                    b.Property<string>("GoogleMapUrl");
220
+
221
+                    b.Property<bool>("IsDeleted");
222
+
223
+                    b.Property<decimal>("Latitude");
224
+
225
+                    b.Property<string>("Logo");
226
+
227
+                    b.Property<decimal>("Longitude");
228
+
229
+                    b.Property<string>("MethodsOfPayment");
230
+
231
+                    b.Property<DateTime>("Modified");
232
+
233
+                    b.Property<string>("ModifiedBy");
234
+
235
+                    b.Property<string>("Name");
236
+
237
+                    b.Property<string>("PostalCode");
238
+
239
+                    b.Property<string>("Provice");
240
+
241
+                    b.Property<string>("ShopNumber");
242
+
243
+                    b.Property<string>("ShoppingCentre");
244
+
245
+                    b.Property<string>("StreetName");
246
+
247
+                    b.Property<string>("StreetNumber");
248
+
249
+                    b.Property<string>("Suburb");
250
+
251
+                    b.HasKey("Id");
252
+
253
+                    b.ToTable("Restaurants");
254
+                });
255
+
256
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
257
+                {
258
+                    b.Property<int>("Id")
259
+                        .ValueGeneratedOnAdd()
260
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
261
+
262
+                    b.Property<DateTime>("Created");
263
+
264
+                    b.Property<bool>("IsDeleted");
265
+
266
+                    b.Property<DateTime>("Modified");
267
+
268
+                    b.Property<string>("ModifiedBy");
269
+
270
+                    b.Property<int>("RestaurantId");
271
+
272
+                    b.Property<int>("UserId");
273
+
274
+                    b.HasKey("Id");
275
+
276
+                    b.HasIndex("RestaurantId");
277
+
278
+                    b.HasIndex("UserId");
279
+
280
+                    b.ToTable("RestaurantUsers");
281
+                });
282
+
283
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
284
+                {
285
+                    b.Property<int>("Id")
286
+                        .ValueGeneratedOnAdd()
287
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
288
+
289
+                    b.Property<bool>("Closed");
290
+
291
+                    b.Property<DateTime>("ClosingTime");
292
+
293
+                    b.Property<DateTime>("Created");
294
+
295
+                    b.Property<string>("Description");
296
+
297
+                    b.Property<bool>("IsDeleted");
298
+
299
+                    b.Property<DateTime>("Modified");
300
+
301
+                    b.Property<string>("ModifiedBy");
302
+
303
+                    b.Property<bool>("Opened24H");
304
+
305
+                    b.Property<DateTime>("OpeningTime");
306
+
307
+                    b.Property<int>("RestaurantId");
308
+
309
+                    b.HasKey("Id");
310
+
311
+                    b.HasIndex("RestaurantId");
312
+
313
+                    b.ToTable("TradingHours");
314
+                });
315
+
316
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
317
+                {
318
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
319
+                        .WithOne("DriverDetails")
320
+                        .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
321
+                        .OnDelete(DeleteBehavior.Cascade);
322
+                });
323
+
324
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
325
+                {
326
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
327
+                        .WithMany("Addresses")
328
+                        .HasForeignKey("UserId")
329
+                        .OnDelete(DeleteBehavior.Cascade);
330
+                });
331
+
332
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
333
+                {
334
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
335
+                        .WithMany()
336
+                        .HasForeignKey("RestaurantId")
337
+                        .OnDelete(DeleteBehavior.Cascade);
338
+                });
339
+
340
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
341
+                {
342
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
343
+                        .WithMany()
344
+                        .HasForeignKey("RestaurantId")
345
+                        .OnDelete(DeleteBehavior.Cascade);
346
+                });
347
+
348
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
349
+                {
350
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
351
+                        .WithMany("Users")
352
+                        .HasForeignKey("RestaurantId")
353
+                        .OnDelete(DeleteBehavior.Cascade);
354
+
355
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
356
+                        .WithMany()
357
+                        .HasForeignKey("UserId")
358
+                        .OnDelete(DeleteBehavior.Cascade);
359
+                });
360
+
361
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
362
+                {
363
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
364
+                        .WithMany("TradingHours")
365
+                        .HasForeignKey("RestaurantId")
366
+                        .OnDelete(DeleteBehavior.Cascade);
367
+                });
368
+#pragma warning restore 612, 618
369
+        }
370
+    }
371
+}

+ 23
- 0
ProRestaurant/Migrations/20200608113150_001.cs Parādīt failu

1
+using Microsoft.EntityFrameworkCore.Migrations;
2
+
3
+namespace ProRestaurant.Migrations
4
+{
5
+    public partial class _001 : Migration
6
+    {
7
+        protected override void Up(MigrationBuilder migrationBuilder)
8
+        {
9
+            migrationBuilder.AddColumn<bool>(
10
+                name: "Opened24H",
11
+                table: "TradingHours",
12
+                nullable: false,
13
+                defaultValue: false);
14
+        }
15
+
16
+        protected override void Down(MigrationBuilder migrationBuilder)
17
+        {
18
+            migrationBuilder.DropColumn(
19
+                name: "Opened24H",
20
+                table: "TradingHours");
21
+        }
22
+    }
23
+}

+ 388
- 0
ProRestaurant/Migrations/20200608133845_002.Designer.cs Parādīt failu

1
+// <auto-generated />
2
+using System;
3
+using Microsoft.EntityFrameworkCore;
4
+using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
6
+using Microsoft.EntityFrameworkCore.Migrations;
7
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8
+using ProRestaurant.DBContexts;
9
+
10
+namespace ProRestaurant.Migrations
11
+{
12
+    [DbContext(typeof(DBContext))]
13
+    [Migration("20200608133845_002")]
14
+    partial class _002
15
+    {
16
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
+        {
18
+#pragma warning disable 612, 618
19
+            modelBuilder
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
22
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23
+
24
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
25
+                {
26
+                    b.Property<int>("Id")
27
+                        .ValueGeneratedOnAdd()
28
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
29
+
30
+                    b.Property<DateTime>("Created");
31
+
32
+                    b.Property<bool>("IsDeleted");
33
+
34
+                    b.Property<DateTime>("Modified");
35
+
36
+                    b.Property<string>("ModifiedBy");
37
+
38
+                    b.Property<string>("Photo");
39
+
40
+                    b.Property<string>("RegistrationNumber");
41
+
42
+                    b.Property<int>("UserId");
43
+
44
+                    b.HasKey("Id");
45
+
46
+                    b.HasIndex("UserId")
47
+                        .IsUnique();
48
+
49
+                    b.ToTable("DriverDetails");
50
+                });
51
+
52
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.User", b =>
53
+                {
54
+                    b.Property<int>("Id")
55
+                        .ValueGeneratedOnAdd()
56
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
57
+
58
+                    b.Property<string>("Cellphone");
59
+
60
+                    b.Property<DateTime>("Created");
61
+
62
+                    b.Property<string>("EmailAddress");
63
+
64
+                    b.Property<string>("FirstName");
65
+
66
+                    b.Property<bool>("IsDeleted");
67
+
68
+                    b.Property<DateTime>("Modified");
69
+
70
+                    b.Property<string>("ModifiedBy");
71
+
72
+                    b.Property<string>("Password");
73
+
74
+                    b.Property<string>("Surname");
75
+
76
+                    b.Property<int>("SystemRole");
77
+
78
+                    b.HasKey("Id");
79
+
80
+                    b.ToTable("Users");
81
+                });
82
+
83
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
84
+                {
85
+                    b.Property<int>("Id")
86
+                        .ValueGeneratedOnAdd()
87
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
88
+
89
+                    b.Property<string>("City");
90
+
91
+                    b.Property<string>("ComplexName");
92
+
93
+                    b.Property<string>("Country");
94
+
95
+                    b.Property<DateTime>("Created");
96
+
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
101
+                    b.Property<bool>("IsDeleted");
102
+
103
+                    b.Property<decimal>("Latitude");
104
+
105
+                    b.Property<decimal>("Longitude");
106
+
107
+                    b.Property<DateTime>("Modified");
108
+
109
+                    b.Property<string>("ModifiedBy");
110
+
111
+                    b.Property<string>("PostalCode");
112
+
113
+                    b.Property<string>("Provice");
114
+
115
+                    b.Property<string>("SteetNumber");
116
+
117
+                    b.Property<string>("StreetName");
118
+
119
+                    b.Property<string>("Suburb");
120
+
121
+                    b.Property<string>("UnitNumber");
122
+
123
+                    b.Property<int>("UserId");
124
+
125
+                    b.HasKey("Id");
126
+
127
+                    b.HasIndex("UserId");
128
+
129
+                    b.ToTable("UserAddresses");
130
+                });
131
+
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
145
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
146
+                {
147
+                    b.Property<int>("Id")
148
+                        .ValueGeneratedOnAdd()
149
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
150
+
151
+                    b.Property<DateTime>("Created");
152
+
153
+                    b.Property<string>("Description");
154
+
155
+                    b.Property<bool>("IsDeleted");
156
+
157
+                    b.Property<DateTime>("Modified");
158
+
159
+                    b.Property<string>("ModifiedBy");
160
+
161
+                    b.Property<int>("RestaurantId");
162
+
163
+                    b.HasKey("Id");
164
+
165
+                    b.HasIndex("RestaurantId");
166
+
167
+                    b.ToTable("MenuCategories");
168
+                });
169
+
170
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
171
+                {
172
+                    b.Property<int>("Id")
173
+                        .ValueGeneratedOnAdd()
174
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
175
+
176
+                    b.Property<int>("CategoryId");
177
+
178
+                    b.Property<DateTime>("Created");
179
+
180
+                    b.Property<string>("Description");
181
+
182
+                    b.Property<string>("Image");
183
+
184
+                    b.Property<bool>("IsDeleted");
185
+
186
+                    b.Property<DateTime>("Modified");
187
+
188
+                    b.Property<string>("ModifiedBy");
189
+
190
+                    b.Property<decimal>("Price");
191
+
192
+                    b.Property<int>("RestaurantId");
193
+
194
+                    b.HasKey("Id");
195
+
196
+                    b.HasIndex("RestaurantId");
197
+
198
+                    b.ToTable("MenuItems");
199
+                });
200
+
201
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
202
+                {
203
+                    b.Property<int>("Id")
204
+                        .ValueGeneratedOnAdd()
205
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
206
+
207
+                    b.Property<string>("Categories");
208
+
209
+                    b.Property<bool>("Chain");
210
+
211
+                    b.Property<string>("City");
212
+
213
+                    b.Property<string>("Country");
214
+
215
+                    b.Property<DateTime>("Created");
216
+
217
+                    b.Property<decimal>("DeliveryFee");
218
+
219
+                    b.Property<decimal>("DeliveryRadius");
220
+
221
+                    b.Property<string>("DeliveryTime");
222
+
223
+                    b.Property<string>("GoogleMapUrl");
224
+
225
+                    b.Property<bool>("IsDeleted");
226
+
227
+                    b.Property<decimal>("Latitude");
228
+
229
+                    b.Property<string>("Logo");
230
+
231
+                    b.Property<decimal>("Longitude");
232
+
233
+                    b.Property<string>("MethodsOfPayment");
234
+
235
+                    b.Property<DateTime>("Modified");
236
+
237
+                    b.Property<string>("ModifiedBy");
238
+
239
+                    b.Property<string>("Name");
240
+
241
+                    b.Property<string>("PostalCode");
242
+
243
+                    b.Property<string>("Provice");
244
+
245
+                    b.Property<string>("ShopNumber");
246
+
247
+                    b.Property<string>("ShoppingCentre");
248
+
249
+                    b.Property<string>("StreetName");
250
+
251
+                    b.Property<string>("StreetNumber");
252
+
253
+                    b.Property<string>("Suburb");
254
+
255
+                    b.HasKey("Id");
256
+
257
+                    b.ToTable("Restaurants");
258
+                });
259
+
260
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
261
+                {
262
+                    b.Property<int>("Id")
263
+                        .ValueGeneratedOnAdd()
264
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
265
+
266
+                    b.Property<string>("Description");
267
+
268
+                    b.HasKey("Id");
269
+
270
+                    b.ToTable("RestaurantCategories");
271
+                });
272
+
273
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
274
+                {
275
+                    b.Property<int>("Id")
276
+                        .ValueGeneratedOnAdd()
277
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
278
+
279
+                    b.Property<DateTime>("Created");
280
+
281
+                    b.Property<bool>("IsDeleted");
282
+
283
+                    b.Property<DateTime>("Modified");
284
+
285
+                    b.Property<string>("ModifiedBy");
286
+
287
+                    b.Property<int>("RestaurantId");
288
+
289
+                    b.Property<int>("UserId");
290
+
291
+                    b.HasKey("Id");
292
+
293
+                    b.HasIndex("RestaurantId");
294
+
295
+                    b.HasIndex("UserId");
296
+
297
+                    b.ToTable("RestaurantUsers");
298
+                });
299
+
300
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
301
+                {
302
+                    b.Property<int>("Id")
303
+                        .ValueGeneratedOnAdd()
304
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
305
+
306
+                    b.Property<bool>("Closed");
307
+
308
+                    b.Property<DateTime>("ClosingTime");
309
+
310
+                    b.Property<DateTime>("Created");
311
+
312
+                    b.Property<string>("Description");
313
+
314
+                    b.Property<bool>("IsDeleted");
315
+
316
+                    b.Property<DateTime>("Modified");
317
+
318
+                    b.Property<string>("ModifiedBy");
319
+
320
+                    b.Property<bool>("Opened24H");
321
+
322
+                    b.Property<DateTime>("OpeningTime");
323
+
324
+                    b.Property<int>("RestaurantId");
325
+
326
+                    b.HasKey("Id");
327
+
328
+                    b.HasIndex("RestaurantId");
329
+
330
+                    b.ToTable("TradingHours");
331
+                });
332
+
333
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
334
+                {
335
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
336
+                        .WithOne("DriverDetails")
337
+                        .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
338
+                        .OnDelete(DeleteBehavior.Cascade);
339
+                });
340
+
341
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
342
+                {
343
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
344
+                        .WithMany("Addresses")
345
+                        .HasForeignKey("UserId")
346
+                        .OnDelete(DeleteBehavior.Cascade);
347
+                });
348
+
349
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
350
+                {
351
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
352
+                        .WithMany()
353
+                        .HasForeignKey("RestaurantId")
354
+                        .OnDelete(DeleteBehavior.Cascade);
355
+                });
356
+
357
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
358
+                {
359
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
360
+                        .WithMany()
361
+                        .HasForeignKey("RestaurantId")
362
+                        .OnDelete(DeleteBehavior.Cascade);
363
+                });
364
+
365
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
366
+                {
367
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
368
+                        .WithMany("Users")
369
+                        .HasForeignKey("RestaurantId")
370
+                        .OnDelete(DeleteBehavior.Cascade);
371
+
372
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
373
+                        .WithMany()
374
+                        .HasForeignKey("UserId")
375
+                        .OnDelete(DeleteBehavior.Cascade);
376
+                });
377
+
378
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
379
+                {
380
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
381
+                        .WithMany("TradingHours")
382
+                        .HasForeignKey("RestaurantId")
383
+                        .OnDelete(DeleteBehavior.Cascade);
384
+                });
385
+#pragma warning restore 612, 618
386
+        }
387
+    }
388
+}

+ 48
- 0
ProRestaurant/Migrations/20200608133845_002.cs Parādīt failu

1
+using Microsoft.EntityFrameworkCore.Metadata;
2
+using Microsoft.EntityFrameworkCore.Migrations;
3
+
4
+namespace ProRestaurant.Migrations
5
+{
6
+    public partial class _002 : Migration
7
+    {
8
+        protected override void Up(MigrationBuilder migrationBuilder)
9
+        {
10
+            migrationBuilder.AddColumn<string>(
11
+                name: "Categories",
12
+                table: "Restaurants",
13
+                nullable: true);
14
+
15
+            migrationBuilder.AddColumn<string>(
16
+                name: "DeliveryTime",
17
+                table: "Restaurants",
18
+                nullable: true);
19
+
20
+            migrationBuilder.CreateTable(
21
+                name: "RestaurantCategories",
22
+                columns: table => new
23
+                {
24
+                    Id = table.Column<int>(nullable: false)
25
+                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
26
+                    Description = table.Column<string>(nullable: true)
27
+                },
28
+                constraints: table =>
29
+                {
30
+                    table.PrimaryKey("PK_RestaurantCategories", x => x.Id);
31
+                });
32
+        }
33
+
34
+        protected override void Down(MigrationBuilder migrationBuilder)
35
+        {
36
+            migrationBuilder.DropTable(
37
+                name: "RestaurantCategories");
38
+
39
+            migrationBuilder.DropColumn(
40
+                name: "Categories",
41
+                table: "Restaurants");
42
+
43
+            migrationBuilder.DropColumn(
44
+                name: "DeliveryTime",
45
+                table: "Restaurants");
46
+        }
47
+    }
48
+}

+ 386
- 0
ProRestaurant/Migrations/20200608133952_003.Designer.cs Parādīt failu

1
+// <auto-generated />
2
+using System;
3
+using Microsoft.EntityFrameworkCore;
4
+using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
6
+using Microsoft.EntityFrameworkCore.Migrations;
7
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8
+using ProRestaurant.DBContexts;
9
+
10
+namespace ProRestaurant.Migrations
11
+{
12
+    [DbContext(typeof(DBContext))]
13
+    [Migration("20200608133952_003")]
14
+    partial class _003
15
+    {
16
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
+        {
18
+#pragma warning disable 612, 618
19
+            modelBuilder
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
22
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23
+
24
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
25
+                {
26
+                    b.Property<int>("Id")
27
+                        .ValueGeneratedOnAdd()
28
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
29
+
30
+                    b.Property<DateTime>("Created");
31
+
32
+                    b.Property<bool>("IsDeleted");
33
+
34
+                    b.Property<DateTime>("Modified");
35
+
36
+                    b.Property<string>("ModifiedBy");
37
+
38
+                    b.Property<string>("Photo");
39
+
40
+                    b.Property<string>("RegistrationNumber");
41
+
42
+                    b.Property<int>("UserId");
43
+
44
+                    b.HasKey("Id");
45
+
46
+                    b.HasIndex("UserId")
47
+                        .IsUnique();
48
+
49
+                    b.ToTable("DriverDetails");
50
+                });
51
+
52
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.User", b =>
53
+                {
54
+                    b.Property<int>("Id")
55
+                        .ValueGeneratedOnAdd()
56
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
57
+
58
+                    b.Property<string>("Cellphone");
59
+
60
+                    b.Property<DateTime>("Created");
61
+
62
+                    b.Property<string>("EmailAddress");
63
+
64
+                    b.Property<string>("FirstName");
65
+
66
+                    b.Property<bool>("IsDeleted");
67
+
68
+                    b.Property<DateTime>("Modified");
69
+
70
+                    b.Property<string>("ModifiedBy");
71
+
72
+                    b.Property<string>("Password");
73
+
74
+                    b.Property<string>("Surname");
75
+
76
+                    b.Property<int>("SystemRole");
77
+
78
+                    b.HasKey("Id");
79
+
80
+                    b.ToTable("Users");
81
+                });
82
+
83
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
84
+                {
85
+                    b.Property<int>("Id")
86
+                        .ValueGeneratedOnAdd()
87
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
88
+
89
+                    b.Property<string>("City");
90
+
91
+                    b.Property<string>("ComplexName");
92
+
93
+                    b.Property<string>("Country");
94
+
95
+                    b.Property<DateTime>("Created");
96
+
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
101
+                    b.Property<bool>("IsDeleted");
102
+
103
+                    b.Property<decimal>("Latitude");
104
+
105
+                    b.Property<decimal>("Longitude");
106
+
107
+                    b.Property<DateTime>("Modified");
108
+
109
+                    b.Property<string>("ModifiedBy");
110
+
111
+                    b.Property<string>("PostalCode");
112
+
113
+                    b.Property<string>("Provice");
114
+
115
+                    b.Property<string>("SteetNumber");
116
+
117
+                    b.Property<string>("StreetName");
118
+
119
+                    b.Property<string>("Suburb");
120
+
121
+                    b.Property<string>("UnitNumber");
122
+
123
+                    b.Property<int>("UserId");
124
+
125
+                    b.HasKey("Id");
126
+
127
+                    b.HasIndex("UserId");
128
+
129
+                    b.ToTable("UserAddresses");
130
+                });
131
+
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
145
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
146
+                {
147
+                    b.Property<int>("Id")
148
+                        .ValueGeneratedOnAdd()
149
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
150
+
151
+                    b.Property<DateTime>("Created");
152
+
153
+                    b.Property<string>("Description");
154
+
155
+                    b.Property<bool>("IsDeleted");
156
+
157
+                    b.Property<DateTime>("Modified");
158
+
159
+                    b.Property<string>("ModifiedBy");
160
+
161
+                    b.Property<int>("RestaurantId");
162
+
163
+                    b.HasKey("Id");
164
+
165
+                    b.HasIndex("RestaurantId");
166
+
167
+                    b.ToTable("MenuCategories");
168
+                });
169
+
170
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
171
+                {
172
+                    b.Property<int>("Id")
173
+                        .ValueGeneratedOnAdd()
174
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
175
+
176
+                    b.Property<int>("CategoryId");
177
+
178
+                    b.Property<DateTime>("Created");
179
+
180
+                    b.Property<string>("Description");
181
+
182
+                    b.Property<string>("Image");
183
+
184
+                    b.Property<bool>("IsDeleted");
185
+
186
+                    b.Property<DateTime>("Modified");
187
+
188
+                    b.Property<string>("ModifiedBy");
189
+
190
+                    b.Property<decimal>("Price");
191
+
192
+                    b.Property<int>("RestaurantId");
193
+
194
+                    b.HasKey("Id");
195
+
196
+                    b.HasIndex("RestaurantId");
197
+
198
+                    b.ToTable("MenuItems");
199
+                });
200
+
201
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
202
+                {
203
+                    b.Property<int>("Id")
204
+                        .ValueGeneratedOnAdd()
205
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
206
+
207
+                    b.Property<string>("Categories");
208
+
209
+                    b.Property<string>("City");
210
+
211
+                    b.Property<string>("Country");
212
+
213
+                    b.Property<DateTime>("Created");
214
+
215
+                    b.Property<decimal>("DeliveryFee");
216
+
217
+                    b.Property<decimal>("DeliveryRadius");
218
+
219
+                    b.Property<string>("DeliveryTime");
220
+
221
+                    b.Property<string>("GoogleMapUrl");
222
+
223
+                    b.Property<bool>("IsDeleted");
224
+
225
+                    b.Property<decimal>("Latitude");
226
+
227
+                    b.Property<string>("Logo");
228
+
229
+                    b.Property<decimal>("Longitude");
230
+
231
+                    b.Property<string>("MethodsOfPayment");
232
+
233
+                    b.Property<DateTime>("Modified");
234
+
235
+                    b.Property<string>("ModifiedBy");
236
+
237
+                    b.Property<string>("Name");
238
+
239
+                    b.Property<string>("PostalCode");
240
+
241
+                    b.Property<string>("Provice");
242
+
243
+                    b.Property<string>("ShopNumber");
244
+
245
+                    b.Property<string>("ShoppingCentre");
246
+
247
+                    b.Property<string>("StreetName");
248
+
249
+                    b.Property<string>("StreetNumber");
250
+
251
+                    b.Property<string>("Suburb");
252
+
253
+                    b.HasKey("Id");
254
+
255
+                    b.ToTable("Restaurants");
256
+                });
257
+
258
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
259
+                {
260
+                    b.Property<int>("Id")
261
+                        .ValueGeneratedOnAdd()
262
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
263
+
264
+                    b.Property<string>("Description");
265
+
266
+                    b.HasKey("Id");
267
+
268
+                    b.ToTable("RestaurantCategories");
269
+                });
270
+
271
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
272
+                {
273
+                    b.Property<int>("Id")
274
+                        .ValueGeneratedOnAdd()
275
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
276
+
277
+                    b.Property<DateTime>("Created");
278
+
279
+                    b.Property<bool>("IsDeleted");
280
+
281
+                    b.Property<DateTime>("Modified");
282
+
283
+                    b.Property<string>("ModifiedBy");
284
+
285
+                    b.Property<int>("RestaurantId");
286
+
287
+                    b.Property<int>("UserId");
288
+
289
+                    b.HasKey("Id");
290
+
291
+                    b.HasIndex("RestaurantId");
292
+
293
+                    b.HasIndex("UserId");
294
+
295
+                    b.ToTable("RestaurantUsers");
296
+                });
297
+
298
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
299
+                {
300
+                    b.Property<int>("Id")
301
+                        .ValueGeneratedOnAdd()
302
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
303
+
304
+                    b.Property<bool>("Closed");
305
+
306
+                    b.Property<DateTime>("ClosingTime");
307
+
308
+                    b.Property<DateTime>("Created");
309
+
310
+                    b.Property<string>("Description");
311
+
312
+                    b.Property<bool>("IsDeleted");
313
+
314
+                    b.Property<DateTime>("Modified");
315
+
316
+                    b.Property<string>("ModifiedBy");
317
+
318
+                    b.Property<bool>("Opened24H");
319
+
320
+                    b.Property<DateTime>("OpeningTime");
321
+
322
+                    b.Property<int>("RestaurantId");
323
+
324
+                    b.HasKey("Id");
325
+
326
+                    b.HasIndex("RestaurantId");
327
+
328
+                    b.ToTable("TradingHours");
329
+                });
330
+
331
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
332
+                {
333
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
334
+                        .WithOne("DriverDetails")
335
+                        .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
336
+                        .OnDelete(DeleteBehavior.Cascade);
337
+                });
338
+
339
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
340
+                {
341
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
342
+                        .WithMany("Addresses")
343
+                        .HasForeignKey("UserId")
344
+                        .OnDelete(DeleteBehavior.Cascade);
345
+                });
346
+
347
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
348
+                {
349
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
350
+                        .WithMany()
351
+                        .HasForeignKey("RestaurantId")
352
+                        .OnDelete(DeleteBehavior.Cascade);
353
+                });
354
+
355
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
356
+                {
357
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
358
+                        .WithMany()
359
+                        .HasForeignKey("RestaurantId")
360
+                        .OnDelete(DeleteBehavior.Cascade);
361
+                });
362
+
363
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
364
+                {
365
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
366
+                        .WithMany("Users")
367
+                        .HasForeignKey("RestaurantId")
368
+                        .OnDelete(DeleteBehavior.Cascade);
369
+
370
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
371
+                        .WithMany()
372
+                        .HasForeignKey("UserId")
373
+                        .OnDelete(DeleteBehavior.Cascade);
374
+                });
375
+
376
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
377
+                {
378
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
379
+                        .WithMany("TradingHours")
380
+                        .HasForeignKey("RestaurantId")
381
+                        .OnDelete(DeleteBehavior.Cascade);
382
+                });
383
+#pragma warning restore 612, 618
384
+        }
385
+    }
386
+}

+ 23
- 0
ProRestaurant/Migrations/20200608133952_003.cs Parādīt failu

1
+using Microsoft.EntityFrameworkCore.Migrations;
2
+
3
+namespace ProRestaurant.Migrations
4
+{
5
+    public partial class _003 : Migration
6
+    {
7
+        protected override void Up(MigrationBuilder migrationBuilder)
8
+        {
9
+            migrationBuilder.DropColumn(
10
+                name: "Chain",
11
+                table: "Restaurants");
12
+        }
13
+
14
+        protected override void Down(MigrationBuilder migrationBuilder)
15
+        {
16
+            migrationBuilder.AddColumn<bool>(
17
+                name: "Chain",
18
+                table: "Restaurants",
19
+                nullable: false,
20
+                defaultValue: false);
21
+        }
22
+    }
23
+}

+ 390
- 0
ProRestaurant/Migrations/20200609191325_004.Designer.cs Parādīt failu

1
+// <auto-generated />
2
+using System;
3
+using Microsoft.EntityFrameworkCore;
4
+using Microsoft.EntityFrameworkCore.Infrastructure;
5
+using Microsoft.EntityFrameworkCore.Metadata;
6
+using Microsoft.EntityFrameworkCore.Migrations;
7
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
8
+using ProRestaurant.DBContexts;
9
+
10
+namespace ProRestaurant.Migrations
11
+{
12
+    [DbContext(typeof(DBContext))]
13
+    [Migration("20200609191325_004")]
14
+    partial class _004
15
+    {
16
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
17
+        {
18
+#pragma warning disable 612, 618
19
+            modelBuilder
20
+                .HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
21
+                .HasAnnotation("Relational:MaxIdentifierLength", 128)
22
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
23
+
24
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
25
+                {
26
+                    b.Property<int>("Id")
27
+                        .ValueGeneratedOnAdd()
28
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
29
+
30
+                    b.Property<DateTime>("Created");
31
+
32
+                    b.Property<bool>("IsDeleted");
33
+
34
+                    b.Property<DateTime>("Modified");
35
+
36
+                    b.Property<string>("ModifiedBy");
37
+
38
+                    b.Property<string>("Photo");
39
+
40
+                    b.Property<string>("RegistrationNumber");
41
+
42
+                    b.Property<int>("UserId");
43
+
44
+                    b.HasKey("Id");
45
+
46
+                    b.HasIndex("UserId")
47
+                        .IsUnique();
48
+
49
+                    b.ToTable("DriverDetails");
50
+                });
51
+
52
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.User", b =>
53
+                {
54
+                    b.Property<int>("Id")
55
+                        .ValueGeneratedOnAdd()
56
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
57
+
58
+                    b.Property<string>("Cellphone");
59
+
60
+                    b.Property<DateTime>("Created");
61
+
62
+                    b.Property<string>("EmailAddress");
63
+
64
+                    b.Property<string>("FirstName");
65
+
66
+                    b.Property<bool>("IsDeleted");
67
+
68
+                    b.Property<DateTime>("Modified");
69
+
70
+                    b.Property<string>("ModifiedBy");
71
+
72
+                    b.Property<string>("Password");
73
+
74
+                    b.Property<string>("Surname");
75
+
76
+                    b.Property<int>("SystemRole");
77
+
78
+                    b.HasKey("Id");
79
+
80
+                    b.ToTable("Users");
81
+                });
82
+
83
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
84
+                {
85
+                    b.Property<int>("Id")
86
+                        .ValueGeneratedOnAdd()
87
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
88
+
89
+                    b.Property<string>("City");
90
+
91
+                    b.Property<string>("ComplexName");
92
+
93
+                    b.Property<string>("Country");
94
+
95
+                    b.Property<DateTime>("Created");
96
+
97
+                    b.Property<string>("GoogleMapUrl");
98
+
99
+                    b.Property<bool>("IsDefault");
100
+
101
+                    b.Property<bool>("IsDeleted");
102
+
103
+                    b.Property<decimal>("Latitude");
104
+
105
+                    b.Property<decimal>("Longitude");
106
+
107
+                    b.Property<DateTime>("Modified");
108
+
109
+                    b.Property<string>("ModifiedBy");
110
+
111
+                    b.Property<string>("PostalCode");
112
+
113
+                    b.Property<string>("Provice");
114
+
115
+                    b.Property<string>("SteetNumber");
116
+
117
+                    b.Property<string>("StreetName");
118
+
119
+                    b.Property<string>("Suburb");
120
+
121
+                    b.Property<string>("UnitNumber");
122
+
123
+                    b.Property<int>("UserId");
124
+
125
+                    b.HasKey("Id");
126
+
127
+                    b.HasIndex("UserId");
128
+
129
+                    b.ToTable("UserAddresses");
130
+                });
131
+
132
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
133
+                {
134
+                    b.Property<int>("Id")
135
+                        .ValueGeneratedOnAdd()
136
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
137
+
138
+                    b.Property<string>("CategoryStore");
139
+
140
+                    b.Property<string>("ImageStore");
141
+
142
+                    b.HasKey("Id");
143
+
144
+                    b.ToTable("Locations");
145
+                });
146
+
147
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
148
+                {
149
+                    b.Property<int>("Id")
150
+                        .ValueGeneratedOnAdd()
151
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
152
+
153
+                    b.Property<DateTime>("Created");
154
+
155
+                    b.Property<string>("Description");
156
+
157
+                    b.Property<bool>("IsDeleted");
158
+
159
+                    b.Property<DateTime>("Modified");
160
+
161
+                    b.Property<string>("ModifiedBy");
162
+
163
+                    b.Property<int>("RestaurantId");
164
+
165
+                    b.HasKey("Id");
166
+
167
+                    b.HasIndex("RestaurantId");
168
+
169
+                    b.ToTable("MenuCategories");
170
+                });
171
+
172
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
173
+                {
174
+                    b.Property<int>("Id")
175
+                        .ValueGeneratedOnAdd()
176
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
177
+
178
+                    b.Property<int>("CategoryId");
179
+
180
+                    b.Property<DateTime>("Created");
181
+
182
+                    b.Property<string>("Description");
183
+
184
+                    b.Property<string>("Image");
185
+
186
+                    b.Property<bool>("IsDeleted");
187
+
188
+                    b.Property<DateTime>("Modified");
189
+
190
+                    b.Property<string>("ModifiedBy");
191
+
192
+                    b.Property<decimal>("Price");
193
+
194
+                    b.Property<int>("RestaurantId");
195
+
196
+                    b.HasKey("Id");
197
+
198
+                    b.HasIndex("RestaurantId");
199
+
200
+                    b.ToTable("MenuItems");
201
+                });
202
+
203
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.Restaurant", b =>
204
+                {
205
+                    b.Property<int>("Id")
206
+                        .ValueGeneratedOnAdd()
207
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
208
+
209
+                    b.Property<string>("Categories");
210
+
211
+                    b.Property<string>("City");
212
+
213
+                    b.Property<string>("Country");
214
+
215
+                    b.Property<DateTime>("Created");
216
+
217
+                    b.Property<decimal>("DeliveryFee");
218
+
219
+                    b.Property<decimal>("DeliveryRadius");
220
+
221
+                    b.Property<string>("DeliveryTime");
222
+
223
+                    b.Property<string>("GoogleMapUrl");
224
+
225
+                    b.Property<bool>("IsDeleted");
226
+
227
+                    b.Property<decimal>("Latitude");
228
+
229
+                    b.Property<string>("Logo");
230
+
231
+                    b.Property<decimal>("Longitude");
232
+
233
+                    b.Property<string>("MethodsOfPayment");
234
+
235
+                    b.Property<DateTime>("Modified");
236
+
237
+                    b.Property<string>("ModifiedBy");
238
+
239
+                    b.Property<string>("Name");
240
+
241
+                    b.Property<string>("PostalCode");
242
+
243
+                    b.Property<string>("Provice");
244
+
245
+                    b.Property<string>("ShopNumber");
246
+
247
+                    b.Property<string>("ShoppingCentre");
248
+
249
+                    b.Property<string>("StreetName");
250
+
251
+                    b.Property<string>("StreetNumber");
252
+
253
+                    b.Property<string>("Suburb");
254
+
255
+                    b.HasKey("Id");
256
+
257
+                    b.ToTable("Restaurants");
258
+                });
259
+
260
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
261
+                {
262
+                    b.Property<int>("Id")
263
+                        .ValueGeneratedOnAdd()
264
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
265
+
266
+                    b.Property<string>("Description");
267
+
268
+                    b.Property<string>("Image");
269
+
270
+                    b.HasKey("Id");
271
+
272
+                    b.ToTable("RestaurantCategories");
273
+                });
274
+
275
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
276
+                {
277
+                    b.Property<int>("Id")
278
+                        .ValueGeneratedOnAdd()
279
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
280
+
281
+                    b.Property<DateTime>("Created");
282
+
283
+                    b.Property<bool>("IsDeleted");
284
+
285
+                    b.Property<DateTime>("Modified");
286
+
287
+                    b.Property<string>("ModifiedBy");
288
+
289
+                    b.Property<int>("RestaurantId");
290
+
291
+                    b.Property<int>("UserId");
292
+
293
+                    b.HasKey("Id");
294
+
295
+                    b.HasIndex("RestaurantId");
296
+
297
+                    b.HasIndex("UserId");
298
+
299
+                    b.ToTable("RestaurantUsers");
300
+                });
301
+
302
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
303
+                {
304
+                    b.Property<int>("Id")
305
+                        .ValueGeneratedOnAdd()
306
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
307
+
308
+                    b.Property<bool>("Closed");
309
+
310
+                    b.Property<DateTime>("ClosingTime");
311
+
312
+                    b.Property<DateTime>("Created");
313
+
314
+                    b.Property<string>("Description");
315
+
316
+                    b.Property<bool>("IsDeleted");
317
+
318
+                    b.Property<DateTime>("Modified");
319
+
320
+                    b.Property<string>("ModifiedBy");
321
+
322
+                    b.Property<bool>("Opened24H");
323
+
324
+                    b.Property<DateTime>("OpeningTime");
325
+
326
+                    b.Property<int>("RestaurantId");
327
+
328
+                    b.HasKey("Id");
329
+
330
+                    b.HasIndex("RestaurantId");
331
+
332
+                    b.ToTable("TradingHours");
333
+                });
334
+
335
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.DriverDetail", b =>
336
+                {
337
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
338
+                        .WithOne("DriverDetails")
339
+                        .HasForeignKey("ProRestaurant.Models.Accounts.DriverDetail", "UserId")
340
+                        .OnDelete(DeleteBehavior.Cascade);
341
+                });
342
+
343
+            modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
344
+                {
345
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
346
+                        .WithMany("Addresses")
347
+                        .HasForeignKey("UserId")
348
+                        .OnDelete(DeleteBehavior.Cascade);
349
+                });
350
+
351
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
352
+                {
353
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
354
+                        .WithMany()
355
+                        .HasForeignKey("RestaurantId")
356
+                        .OnDelete(DeleteBehavior.Cascade);
357
+                });
358
+
359
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuItem", b =>
360
+                {
361
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
362
+                        .WithMany()
363
+                        .HasForeignKey("RestaurantId")
364
+                        .OnDelete(DeleteBehavior.Cascade);
365
+                });
366
+
367
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
368
+                {
369
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
370
+                        .WithMany("Users")
371
+                        .HasForeignKey("RestaurantId")
372
+                        .OnDelete(DeleteBehavior.Cascade);
373
+
374
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
375
+                        .WithMany()
376
+                        .HasForeignKey("UserId")
377
+                        .OnDelete(DeleteBehavior.Cascade);
378
+                });
379
+
380
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
381
+                {
382
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
383
+                        .WithMany("TradingHours")
384
+                        .HasForeignKey("RestaurantId")
385
+                        .OnDelete(DeleteBehavior.Cascade);
386
+                });
387
+#pragma warning restore 612, 618
388
+        }
389
+    }
390
+}

+ 31
- 0
ProRestaurant/Migrations/20200609191325_004.cs Parādīt failu

1
+using Microsoft.EntityFrameworkCore.Migrations;
2
+
3
+namespace ProRestaurant.Migrations
4
+{
5
+    public partial class _004 : Migration
6
+    {
7
+        protected override void Up(MigrationBuilder migrationBuilder)
8
+        {
9
+            migrationBuilder.AddColumn<string>(
10
+                name: "Image",
11
+                table: "RestaurantCategories",
12
+                nullable: true);
13
+
14
+            migrationBuilder.AddColumn<string>(
15
+                name: "CategoryStore",
16
+                table: "Locations",
17
+                nullable: true);
18
+        }
19
+
20
+        protected override void Down(MigrationBuilder migrationBuilder)
21
+        {
22
+            migrationBuilder.DropColumn(
23
+                name: "Image",
24
+                table: "RestaurantCategories");
25
+
26
+            migrationBuilder.DropColumn(
27
+                name: "CategoryStore",
28
+                table: "Locations");
29
+        }
30
+    }
31
+}

+ 107
- 3
ProRestaurant/Migrations/DBContextModelSnapshot.cs Parādīt failu

71
 
71
 
72
                     b.Property<string>("Surname");
72
                     b.Property<string>("Surname");
73
 
73
 
74
+                    b.Property<int>("SystemRole");
75
+
74
                     b.HasKey("Id");
76
                     b.HasKey("Id");
75
 
77
 
76
                     b.ToTable("Users");
78
                     b.ToTable("Users");
90
 
92
 
91
                     b.Property<DateTime>("Created");
93
                     b.Property<DateTime>("Created");
92
 
94
 
95
+                    b.Property<string>("GoogleMapUrl");
96
+
97
+                    b.Property<bool>("IsDefault");
98
+
93
                     b.Property<bool>("IsDeleted");
99
                     b.Property<bool>("IsDeleted");
94
 
100
 
95
                     b.Property<decimal>("Latitude");
101
                     b.Property<decimal>("Latitude");
121
                     b.ToTable("UserAddresses");
127
                     b.ToTable("UserAddresses");
122
                 });
128
                 });
123
 
129
 
130
+            modelBuilder.Entity("ProRestaurant.Models.Misc.Locations", b =>
131
+                {
132
+                    b.Property<int>("Id")
133
+                        .ValueGeneratedOnAdd()
134
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
135
+
136
+                    b.Property<string>("CategoryStore");
137
+
138
+                    b.Property<string>("ImageStore");
139
+
140
+                    b.HasKey("Id");
141
+
142
+                    b.ToTable("Locations");
143
+                });
144
+
124
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
145
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.MenuCategory", b =>
125
                 {
146
                 {
126
                     b.Property<int>("Id")
147
                     b.Property<int>("Id")
183
                         .ValueGeneratedOnAdd()
204
                         .ValueGeneratedOnAdd()
184
                         .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
205
                         .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
185
 
206
 
186
-                    b.Property<bool>("Chain");
207
+                    b.Property<string>("Categories");
208
+
209
+                    b.Property<string>("City");
210
+
211
+                    b.Property<string>("Country");
187
 
212
 
188
                     b.Property<DateTime>("Created");
213
                     b.Property<DateTime>("Created");
189
 
214
 
191
 
216
 
192
                     b.Property<decimal>("DeliveryRadius");
217
                     b.Property<decimal>("DeliveryRadius");
193
 
218
 
219
+                    b.Property<string>("DeliveryTime");
220
+
221
+                    b.Property<string>("GoogleMapUrl");
222
+
194
                     b.Property<bool>("IsDeleted");
223
                     b.Property<bool>("IsDeleted");
195
 
224
 
196
-                    b.Property<string>("Location");
225
+                    b.Property<decimal>("Latitude");
197
 
226
 
198
                     b.Property<string>("Logo");
227
                     b.Property<string>("Logo");
199
 
228
 
229
+                    b.Property<decimal>("Longitude");
230
+
200
                     b.Property<string>("MethodsOfPayment");
231
                     b.Property<string>("MethodsOfPayment");
201
 
232
 
202
                     b.Property<DateTime>("Modified");
233
                     b.Property<DateTime>("Modified");
205
 
236
 
206
                     b.Property<string>("Name");
237
                     b.Property<string>("Name");
207
 
238
 
239
+                    b.Property<string>("PostalCode");
240
+
241
+                    b.Property<string>("Provice");
242
+
243
+                    b.Property<string>("ShopNumber");
244
+
245
+                    b.Property<string>("ShoppingCentre");
246
+
247
+                    b.Property<string>("StreetName");
248
+
249
+                    b.Property<string>("StreetNumber");
250
+
251
+                    b.Property<string>("Suburb");
252
+
208
                     b.HasKey("Id");
253
                     b.HasKey("Id");
209
 
254
 
210
                     b.ToTable("Restaurants");
255
                     b.ToTable("Restaurants");
211
                 });
256
                 });
212
 
257
 
258
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantCategory", b =>
259
+                {
260
+                    b.Property<int>("Id")
261
+                        .ValueGeneratedOnAdd()
262
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
263
+
264
+                    b.Property<string>("Description");
265
+
266
+                    b.Property<string>("Image");
267
+
268
+                    b.HasKey("Id");
269
+
270
+                    b.ToTable("RestaurantCategories");
271
+                });
272
+
273
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
274
+                {
275
+                    b.Property<int>("Id")
276
+                        .ValueGeneratedOnAdd()
277
+                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
278
+
279
+                    b.Property<DateTime>("Created");
280
+
281
+                    b.Property<bool>("IsDeleted");
282
+
283
+                    b.Property<DateTime>("Modified");
284
+
285
+                    b.Property<string>("ModifiedBy");
286
+
287
+                    b.Property<int>("RestaurantId");
288
+
289
+                    b.Property<int>("UserId");
290
+
291
+                    b.HasKey("Id");
292
+
293
+                    b.HasIndex("RestaurantId");
294
+
295
+                    b.HasIndex("UserId");
296
+
297
+                    b.ToTable("RestaurantUsers");
298
+                });
299
+
213
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
300
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
214
                 {
301
                 {
215
                     b.Property<int>("Id")
302
                     b.Property<int>("Id")
216
                         .ValueGeneratedOnAdd()
303
                         .ValueGeneratedOnAdd()
217
                         .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
304
                         .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
218
 
305
 
306
+                    b.Property<bool>("Closed");
307
+
219
                     b.Property<DateTime>("ClosingTime");
308
                     b.Property<DateTime>("ClosingTime");
220
 
309
 
221
                     b.Property<DateTime>("Created");
310
                     b.Property<DateTime>("Created");
228
 
317
 
229
                     b.Property<string>("ModifiedBy");
318
                     b.Property<string>("ModifiedBy");
230
 
319
 
320
+                    b.Property<bool>("Opened24H");
321
+
231
                     b.Property<DateTime>("OpeningTime");
322
                     b.Property<DateTime>("OpeningTime");
232
 
323
 
233
                     b.Property<int>("RestaurantId");
324
                     b.Property<int>("RestaurantId");
250
             modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
341
             modelBuilder.Entity("ProRestaurant.Models.Accounts.UserAddress", b =>
251
                 {
342
                 {
252
                     b.HasOne("ProRestaurant.Models.Accounts.User", "User")
343
                     b.HasOne("ProRestaurant.Models.Accounts.User", "User")
253
-                        .WithMany()
344
+                        .WithMany("Addresses")
254
                         .HasForeignKey("UserId")
345
                         .HasForeignKey("UserId")
255
                         .OnDelete(DeleteBehavior.Cascade);
346
                         .OnDelete(DeleteBehavior.Cascade);
256
                 });
347
                 });
271
                         .OnDelete(DeleteBehavior.Cascade);
362
                         .OnDelete(DeleteBehavior.Cascade);
272
                 });
363
                 });
273
 
364
 
365
+            modelBuilder.Entity("ProRestaurant.Models.Restaurants.RestaurantUser", b =>
366
+                {
367
+                    b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
368
+                        .WithMany("Users")
369
+                        .HasForeignKey("RestaurantId")
370
+                        .OnDelete(DeleteBehavior.Cascade);
371
+
372
+                    b.HasOne("ProRestaurant.Models.Accounts.User", "User")
373
+                        .WithMany()
374
+                        .HasForeignKey("UserId")
375
+                        .OnDelete(DeleteBehavior.Cascade);
376
+                });
377
+
274
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
378
             modelBuilder.Entity("ProRestaurant.Models.Restaurants.TradingHours", b =>
275
                 {
379
                 {
276
                     b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")
380
                     b.HasOne("ProRestaurant.Models.Restaurants.Restaurant", "Restaurant")

+ 6
- 2
ProRestaurant/Models/Accounts/User.cs Parādīt failu

1
-using System;
1
+using ProRestaurant.Classes;
2
+using System;
2
 using System.Collections.Generic;
3
 using System.Collections.Generic;
3
 using System.Linq;
4
 using System.Linq;
4
 using System.Threading.Tasks;
5
 using System.Threading.Tasks;
12
         public string FirstName { get; set; }
13
         public string FirstName { get; set; }
13
         public string Surname { get; set; }
14
         public string Surname { get; set; }
14
         public string Cellphone { get; set; }
15
         public string Cellphone { get; set; }
16
+        public SystemRole SystemRole { get; set; }
15
 
17
 
16
         public virtual DriverDetail DriverDetails { get; set; }
18
         public virtual DriverDetail DriverDetails { get; set; }
17
-    }
19
+
20
+        public ICollection<UserAddress> Addresses { get; set; }
21
+    }    
18
 }
22
 }

+ 2
- 0
ProRestaurant/Models/Accounts/UserAddress.cs Parādīt failu

3
     public class UserAddress : BaseObject
3
     public class UserAddress : BaseObject
4
     {
4
     {
5
         public int UserId { get; set; }
5
         public int UserId { get; set; }
6
+        public bool IsDefault { get; set; }
7
+        public string GoogleMapUrl { get; set; }
6
         public decimal Latitude { get; set; }
8
         public decimal Latitude { get; set; }
7
         public decimal Longitude { get; set; } 
9
         public decimal Longitude { get; set; } 
8
 
10
 

+ 14
- 0
ProRestaurant/Models/Misc/Locations.cs Parādīt failu

1
+using System.ComponentModel.DataAnnotations;
2
+using System.ComponentModel.DataAnnotations.Schema;
3
+
4
+namespace ProRestaurant.Models.Misc
5
+{
6
+    public class Locations
7
+    {
8
+        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
9
+        [Key]
10
+        public int Id { get; set; }
11
+        public string ImageStore { get; set; }
12
+        public string CategoryStore { get; set; }        
13
+    }
14
+}

+ 20
- 9
ProRestaurant/Models/Restaurants/Restaurant.cs Parādīt failu

1
-using Microsoft.AspNetCore.SignalR;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Threading.Tasks;
1
+using System.Collections.Generic;
5
 
2
 
6
 namespace ProRestaurant.Models.Restaurants
3
 namespace ProRestaurant.Models.Restaurants
7
 {
4
 {
8
     public class Restaurant : BaseObject
5
     public class Restaurant : BaseObject
9
     {
6
     {
10
-        public string Name { get; set; }
11
-        public string Location { get; set; } //Set with google's autocomplete(suburb)
12
-        public string Logo { get; set; }
13
-        public bool Chain { get; set; } //if no, do not display the location on card
7
+        public string Name { get; set; }        
8
+        public string Logo { get; set; }        
14
         public decimal DeliveryFee { get; set; }
9
         public decimal DeliveryFee { get; set; }
15
         public decimal DeliveryRadius { get; set; }
10
         public decimal DeliveryRadius { get; set; }
16
         public string MethodsOfPayment { get; set; } //Comma separated list - can be displayed as a drop down. 
11
         public string MethodsOfPayment { get; set; } //Comma separated list - can be displayed as a drop down. 
17
-        public ICollection<TradingHours> TradingHours { get; set; }
12
+        public string ShoppingCentre { get; set; }
13
+        public string ShopNumber { get; set; }
14
+        public string GoogleMapUrl { get; set; }
15
+        public decimal Latitude { get; set; }
16
+        public decimal Longitude { get; set; }
17
+        public string StreetNumber { get; set; }
18
+        public string StreetName { get; set; }
19
+        public string Suburb { get; set; }
20
+        public string City { get; set; }
21
+        public string Provice { get; set; }
22
+        public string Country { get; set; }
23
+        public string PostalCode { get; set; }
24
+        public string DeliveryTime { get; set; }
25
+        public string Categories { get; set; }
26
+
27
+        public ICollection<TradingHours> TradingHours { get; set; }   
28
+        public ICollection<RestaurantUser> Users { get; set; }
18
     }
29
     }
19
 }
30
 }

+ 14
- 0
ProRestaurant/Models/Restaurants/RestaurantCategory.cs Parādīt failu

1
+using System.ComponentModel.DataAnnotations;
2
+using System.ComponentModel.DataAnnotations.Schema;
3
+
4
+namespace ProRestaurant.Models.Restaurants
5
+{
6
+    public class RestaurantCategory
7
+    {
8
+        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
9
+        [Key]
10
+        public int Id { get; set; }
11
+        public string Description { get; set; }
12
+        public string Image { get; set; }
13
+    }
14
+}

+ 16
- 0
ProRestaurant/Models/Restaurants/RestaurantUser.cs Parādīt failu

1
+using ProRestaurant.Models.Accounts;
2
+using System.ComponentModel.DataAnnotations.Schema;
3
+
4
+namespace ProRestaurant.Models.Restaurants
5
+{
6
+    public class RestaurantUser : BaseObject
7
+    {
8
+        [ForeignKey("User")]
9
+        public int UserId { get; set; }
10
+        [ForeignKey("Restaurant")]
11
+        public int RestaurantId { get; set; }
12
+
13
+        public virtual User User { get; set; }
14
+        public virtual Restaurant Restaurant { get; set; }
15
+    }
16
+}

+ 2
- 0
ProRestaurant/Models/Restaurants/TradingHours.cs Parādīt failu

8
         public string Description { get; set;  }
8
         public string Description { get; set;  }
9
         public DateTime OpeningTime { get; set; }
9
         public DateTime OpeningTime { get; set; }
10
         public DateTime ClosingTime { get; set; }
10
         public DateTime ClosingTime { get; set; }
11
+        public bool Closed { get; set; }
12
+        public bool Opened24H { get; set; }
11
 
13
 
12
         public virtual Restaurant Restaurant { get; set; }
14
         public virtual Restaurant Restaurant { get; set; }
13
     }
15
     }

+ 3
- 1
ProRestaurant/ProRestaurant.csproj Parādīt failu

1
-<Project Sdk="Microsoft.NET.Sdk.Web">
1
+<Project Sdk="Microsoft.NET.Sdk.Web">
2
 
2
 
3
   <PropertyGroup>
3
   <PropertyGroup>
4
     <TargetFramework>netcoreapp2.2</TargetFramework>
4
     <TargetFramework>netcoreapp2.2</TargetFramework>
11
     <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
11
     <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
12
     <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.0" />
12
     <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.0" />
13
     <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.2.0" />
13
     <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.2.0" />
14
+    <PackageReference Include="System.Data.SQLite" Version="1.0.113.1" />
15
+    <PackageReference Include="System.Drawing.Common" Version="4.7.0" />
14
   </ItemGroup>
16
   </ItemGroup>
15
 
17
 
16
 </Project>
18
 </Project>

+ 1
- 0
ProRestaurant/ProRestaurant.csproj.user Parādīt failu

3
   <PropertyGroup>
3
   <PropertyGroup>
4
     <Controller_SelectedScaffolderID>ApiControllerWithActionsScaffolder</Controller_SelectedScaffolderID>
4
     <Controller_SelectedScaffolderID>ApiControllerWithActionsScaffolder</Controller_SelectedScaffolderID>
5
     <Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
5
     <Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
6
+    <ShowAllFiles>false</ShowAllFiles>
6
   </PropertyGroup>
7
   </PropertyGroup>
7
 </Project>
8
 </Project>

+ 7
- 8
ProRestaurant/Program.cs Parādīt failu

1
-using System;
2
-using System.Collections.Generic;
3
-using System.IO;
4
-using System.Linq;
5
-using System.Threading.Tasks;
6
-using Microsoft.AspNetCore;
1
+using Microsoft.AspNetCore;
7
 using Microsoft.AspNetCore.Hosting;
2
 using Microsoft.AspNetCore.Hosting;
8
-using Microsoft.Extensions.Configuration;
9
-using Microsoft.Extensions.Logging;
10
 
3
 
11
 namespace ProRestaurant
4
 namespace ProRestaurant
12
 {
5
 {
20
         public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
13
         public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
21
             WebHost.CreateDefaultBuilder(args)
14
             WebHost.CreateDefaultBuilder(args)
22
                 .UseStartup<Startup>();
15
                 .UseStartup<Startup>();
16
+
17
+        public static IWebHost BuildWebHost(string[] args) =>
18
+            WebHost.CreateDefaultBuilder(args)
19
+                .UseStartup<Startup>()
20
+                .UseUrls("http://localhost:58847")
21
+                .Build();
23
     }
22
     }
24
 }
23
 }

+ 80
- 0
ProRestaurant/Repository/Accounts/AuthenticateRepository.cs Parādīt failu

1
+using Microsoft.AspNetCore.Mvc;
2
+using Microsoft.Extensions.Options;
3
+using Microsoft.IdentityModel.Tokens;
4
+using ProRestaurant.Classes;
5
+using ProRestaurant.Containers;
6
+using ProRestaurant.DBContexts;
7
+using ProRestaurant.Models.Accounts;
8
+using System;
9
+using System.Collections.Generic;
10
+using System.IdentityModel.Tokens.Jwt;
11
+using System.Linq;
12
+using System.Security.Claims;
13
+using System.Text;
14
+using System.Threading.Tasks;
15
+
16
+namespace ProRestaurant.Repository.Accounts
17
+{
18
+    public interface IAuthenticateRepository
19
+    {
20
+        AuthenticationContiner Login(AuthenticationContiner user);
21
+        AuthenticationContiner GetAuthenticationContiner();
22
+    }
23
+
24
+    public class AuthenticateRepository : IAuthenticateRepository
25
+    {
26
+        private readonly DBContext dBContext;
27
+        private readonly AppSettings appSettings;
28
+
29
+        public AuthenticateRepository(DBContext _DB, IOptions<AppSettings> _AppSettings)
30
+        {
31
+            dBContext = _DB;
32
+            appSettings = _AppSettings.Value;
33
+        }
34
+
35
+        public AuthenticationContiner GetAuthenticationContiner()
36
+        {
37
+            return new AuthenticationContiner();
38
+        }
39
+
40
+        public AuthenticationContiner Login(AuthenticationContiner user)
41
+        {
42
+            var getUser = dBContext.Users.Where(u => u.EmailAddress == user.EmailAddress).FirstOrDefault();
43
+
44
+            if (getUser != null)
45
+            {
46
+                if (getUser.Password == user.Password)
47
+                {
48
+                    var tokenHandler = new JwtSecurityTokenHandler();
49
+                    var key = Encoding.ASCII.GetBytes(appSettings.Secret);
50
+                    var tokenDescription = new SecurityTokenDescriptor
51
+                    {
52
+                        Subject = new ClaimsIdentity(new Claim[]
53
+                        {
54
+                            new Claim(ClaimTypes.Name, getUser.Id.ToString())
55
+                        }),
56
+                        Expires = DateTime.UtcNow.AddHours(1),
57
+                        SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature)
58
+                    };
59
+                    var token = tokenHandler.CreateToken(tokenDescription);
60
+                    user.Token = tokenHandler.WriteToken(token);
61
+                    user.Result = "Access Granted";
62
+                    user.Name = getUser.FirstName;
63
+                    user.Surname = getUser.Surname;
64
+                    user.EmailAddress = getUser.EmailAddress;
65
+                    user.Password = "";
66
+                    user.Role = getUser.SystemRole.ToString();
67
+                }
68
+                else
69
+                {
70
+                    user.Result = "Incorrect Password";
71
+                }
72
+            }
73
+            else
74
+            {
75
+                user.Result = "User Not Found.";
76
+            }
77
+            return user;
78
+        }
79
+    }
80
+}

+ 16
- 0
ProRestaurant/Repository/Accounts/IRegistrationRepository.cs Parādīt failu

1
+using ProRestaurant.Containers;
2
+using ProRestaurant.Models.Accounts;
3
+using ProRestaurant.Models.Restaurants;
4
+using System;
5
+
6
+namespace ProRestaurant.Repository.Accounts
7
+{
8
+    public interface IRegistrationRepository
9
+    {        
10
+        UserContainer GetUserContainer();        
11
+        RestaurantContainer GetRestaurantContainer();
12
+        UserContainer RegisterUser(UserContainer UserContainer);
13
+        RestaurantContainer RegisterRestaurant(RestaurantContainer RestaurantContainer);
14
+        void Save();                
15
+    }
16
+}

+ 0
- 20
ProRestaurant/Repository/Accounts/IUserRepository.cs Parādīt failu

1
-using ProRestaurant.Containers;
2
-using ProRestaurant.Models.Accounts;
3
-using System;
4
-using System.Collections.Generic;
5
-using System.Linq;
6
-using System.Threading.Tasks;
7
-
8
-namespace ProRestaurant.Repository.Accounts
9
-{
10
-    public interface IUserRepository
11
-    {
12
-        IEnumerable<User> GetUsers();
13
-        User GetUser(Func<User, bool> where);
14
-        void Insert(User user);
15
-        void Remove(User user);
16
-        void Update(User user);
17
-        void Save();
18
-        UserContainer Login(string UserName, string Password);
19
-    }
20
-}

+ 227
- 0
ProRestaurant/Repository/Accounts/RegistrationRepository.cs Parādīt failu

1
+using ProRestaurant.Classes;
2
+using ProRestaurant.Containers;
3
+using ProRestaurant.DBContexts;
4
+using ProRestaurant.Models.Accounts;
5
+using ProRestaurant.Models.Restaurants;
6
+using System;
7
+using System.Collections.Generic;
8
+using System.IO;
9
+using System.Linq;
10
+
11
+namespace ProRestaurant.Repository.Accounts
12
+{
13
+    public class RegistrationRepository : IRegistrationRepository
14
+    {
15
+        private readonly DBContext dBContext;
16
+
17
+        public RegistrationRepository(DBContext _DB)
18
+        {
19
+            dBContext = _DB;
20
+        }
21
+
22
+        public RestaurantContainer GetRestaurantContainer()
23
+        {
24
+            var restaurantContainer = new RestaurantContainer
25
+            {
26
+                Name = "",
27
+                Logo = "",
28
+                MethodsOfPayment = "",
29
+                ShopNumber = "",
30
+                ShoppingCentre = "",
31
+                GoogleMapUrl = "",
32
+                StreetNumber = "",
33
+                StreetName = "",
34
+                Suburb = "",
35
+                City = "",
36
+                Provice = "",
37
+                Country = "",
38
+
39
+            };
40
+
41
+            return restaurantContainer;
42
+        }
43
+
44
+        public UserContainer GetUserContainer()
45
+        {
46
+            var userContainer = new UserContainer()
47
+            {
48
+                FirstName = "",
49
+                Surname = "",
50
+                Cellphone = "",
51
+                EmailAddress = "",
52
+                Password = ""
53
+            };
54
+
55
+            return userContainer;
56
+        }
57
+
58
+        //public UserContainer Login(string UserName, string Password)
59
+        //{
60
+        //    UserContainer returnObject = new UserContainer();
61
+        //    User user = dBContext.Users.Where(u => u.EmailAddress == UserName).FirstOrDefault();
62
+
63
+        //    if (user != null)
64
+        //    {
65
+        //        if (user.Password == Password)
66
+        //        {
67
+        //            returnObject.User = user;
68
+        //            returnObject.ResultString = "Access Granted";
69
+        //        }
70
+        //        else
71
+        //            returnObject.ResultString = "Password incorrect";
72
+        //    }
73
+        //    else
74
+        //    {
75
+        //        returnObject.ResultString = "User not found";
76
+        //    }
77
+        //    return returnObject;
78
+        //}
79
+
80
+        public RestaurantContainer RegisterRestaurant(RestaurantContainer RestaurantContainer)
81
+        {            
82
+            var restaurantCheck = dBContext.Restaurants.Where(r => r.Name == RestaurantContainer.Name && r.Suburb == RestaurantContainer.Suburb && r.City == RestaurantContainer.City && r.Provice == RestaurantContainer.Provice && r.Country == RestaurantContainer.Country).FirstOrDefault();
83
+            if (restaurantCheck != null)
84
+            {
85
+                RestaurantContainer.Result = "A Restaurant with the same name has already been registered in this location. ";
86
+                return RestaurantContainer;
87
+            }
88
+
89
+            var checkUser = dBContext.Users.Where(u => u.EmailAddress == RestaurantContainer.UserEmailAddress).FirstOrDefault();
90
+            if (checkUser != null)
91
+            {
92
+                RestaurantContainer.Result = "A User with this email address already exists. Please use an different Email Address if this Email Address was used for an individule user.";
93
+                return RestaurantContainer;
94
+            }
95
+
96
+            var user = new User
97
+            {
98
+                FirstName = RestaurantContainer.UserFirstName,
99
+                Surname = RestaurantContainer.UserSurname,
100
+                EmailAddress = RestaurantContainer.UserEmailAddress,
101
+                Password = RestaurantContainer.UserPassword,
102
+                SystemRole = Classes.SystemRole.RestaurantAdmin
103
+            };
104
+
105
+            var restaurant = new Restaurant
106
+            {                
107
+                Name = RestaurantContainer.Name,
108
+                DeliveryTime = RestaurantContainer.DeliveryTime,
109
+                DeliveryFee = RestaurantContainer.DeliveryFee,
110
+                DeliveryRadius = RestaurantContainer.DeliveryRadius,
111
+                MethodsOfPayment = RestaurantContainer.MethodsOfPayment,
112
+                ShoppingCentre = RestaurantContainer.ShoppingCentre,
113
+                ShopNumber = RestaurantContainer.ShopNumber,
114
+                GoogleMapUrl = RestaurantContainer.GoogleMapUrl,
115
+                Latitude = RestaurantContainer.Latitude,
116
+                Longitude = RestaurantContainer.Longitude,
117
+                StreetNumber = RestaurantContainer.StreetNumber,
118
+                StreetName = RestaurantContainer.StreetName,
119
+                Suburb = RestaurantContainer.Suburb,
120
+                City = RestaurantContainer.City,
121
+                Provice = RestaurantContainer.Provice,
122
+                Country = RestaurantContainer.Country,
123
+                PostalCode = RestaurantContainer.PostalCode,
124
+                Categories = RestaurantContainer.Categories
125
+            };
126
+
127
+            if (!string.IsNullOrEmpty(restaurant.MethodsOfPayment))
128
+            {
129
+                restaurant.MethodsOfPayment = restaurant.MethodsOfPayment.Substring(0, restaurant.MethodsOfPayment.Length - 1);
130
+            }
131
+            
132
+            if (!string.IsNullOrEmpty(restaurant.Categories))
133
+            {
134
+                restaurant.Categories = restaurant.Categories.Substring(0, restaurant.Categories.Length - 1);
135
+                restaurant.Categories = restaurant.Categories.Replace("|", " - ");
136
+            }
137
+
138
+            if (!string.IsNullOrEmpty(RestaurantContainer.Logo))
139
+            {
140
+                bool saveFile = false;
141
+                var loc = dBContext.Locations.FirstOrDefault()?.ImageStore;
142
+                if (!string.IsNullOrEmpty(loc))
143
+                {
144
+                    var folderName = restaurant.Name + string.Format("{0:yyyy_MM_dd_hh_mm_ss}", DateTime.Now);
145
+                    saveFile = true;
146
+                    loc += string.Format("{0}", folderName);
147
+                    if (!Directory.Exists(loc))
148
+                    {
149
+                        Directory.CreateDirectory(loc);
150
+                    }
151
+
152
+                    if (saveFile)
153
+                    {
154
+                        string path = ImageFormatter.Base64ToImage(RestaurantContainer.Logo, loc, restaurant.Name.Trim());
155
+                        restaurant.Logo = path;
156
+                    }
157
+                }
158
+
159
+                if (!saveFile)
160
+                    restaurant.Logo = RestaurantContainer.Logo;
161
+            }
162
+
163
+            var rUser = new RestaurantUser
164
+            {
165
+                Restaurant = restaurant,
166
+                User = user
167
+            };
168
+
169
+            restaurant.Users = new List<RestaurantUser>() { rUser };
170
+
171
+            if (RestaurantContainer.THours != null && RestaurantContainer.THours.Count > 0)
172
+            {
173
+                restaurant.TradingHours = new List<TradingHours>();
174
+                foreach (var t in RestaurantContainer.THours)
175
+                {
176
+                    restaurant.TradingHours.Add(new TradingHours()
177
+                    {
178
+                        Description = t.Description,
179
+                        OpeningTime = DateTime.Parse(string.Format("{0} {1}", string.Format("{0:yyyy/MM/dd}", DateTime.Now), t.From)),
180
+                        ClosingTime = DateTime.Parse(string.Format("{0} {1}", string.Format("{0:yyyy/MM/dd}", DateTime.Now), t.To)),
181
+                        Closed = t.Closed,
182
+                        Opened24H = t.Open24
183
+                    });
184
+                }
185
+            }           
186
+
187
+            dBContext.Add(restaurant);
188
+            Save();
189
+
190
+            return RestaurantContainer;
191
+        }
192
+
193
+        public UserContainer RegisterUser(UserContainer UserContainer)
194
+        {
195
+            var checkUser = dBContext.Users.Where(u => u.EmailAddress == UserContainer.EmailAddress).FirstOrDefault();
196
+            if (checkUser != null)
197
+            {
198
+                UserContainer.ResultString = "A User with this email address already exists.";
199
+                UserContainer.Password = "";
200
+                return UserContainer;
201
+            }
202
+
203
+            var user = new User
204
+            {
205
+                FirstName = UserContainer.FirstName,
206
+                Surname = UserContainer.Surname,
207
+                Cellphone = UserContainer.Cellphone,
208
+                EmailAddress = UserContainer.EmailAddress,
209
+                Password = UserContainer.Password,
210
+                SystemRole = Classes.SystemRole.Customer
211
+            };
212
+
213
+            dBContext.Add(user);
214
+            Save();
215
+
216
+            UserContainer.Id = user.Id;
217
+            UserContainer.ResultString = "User Created";
218
+
219
+            return UserContainer;
220
+        }
221
+
222
+        public void Save()
223
+        {
224
+            dBContext.SaveChanges();
225
+        }
226
+    }
227
+}

+ 0
- 99
ProRestaurant/Repository/Accounts/UserRepository.cs Parādīt failu

1
-using Microsoft.EntityFrameworkCore;
2
-using Microsoft.EntityFrameworkCore.Internal;
3
-using ProRestaurant.Classes;
4
-using ProRestaurant.Containers;
5
-using ProRestaurant.DBContexts;
6
-using ProRestaurant.Models.Accounts;
7
-using System;
8
-using System.Collections.Generic;
9
-using System.Diagnostics;
10
-using System.Linq;
11
-using System.Text.RegularExpressions;
12
-
13
-namespace ProRestaurant.Repository.Accounts
14
-{
15
-    public class UserRepository : IUserRepository
16
-    {
17
-        private readonly DBContext dBContext;
18
-
19
-        public UserRepository(DBContext _DB)
20
-        {
21
-            dBContext = _DB;
22
-        }
23
-
24
-        public User GetUser(Func<User, bool> where)
25
-        {
26
-            var user = dBContext.Users.Where(where).FirstOrDefault();
27
-            if (user == null)
28
-            {
29
-                user = new User
30
-                {
31
-                    EmailAddress = "",
32
-                    Password = "",
33
-                    FirstName = "",
34
-                    Surname = "",
35
-                    Cellphone = ""
36
-                };
37
-            }
38
-            return user;
39
-        }
40
-
41
-        public IEnumerable<User> GetUsers()
42
-        {
43
-            return dBContext.Users.ToList();
44
-        }
45
-
46
-        public void Insert(User user)
47
-        {            
48
-            dBContext.Add(user);
49
-            Save();
50
-        }
51
-
52
-        public UserContainer Login(string UserName, string Password)
53
-        {
54
-            UserContainer returnObject = new UserContainer();
55
-            User user;
56
-
57
-            string pattern = @"\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\Z";
58
-            if (Regex.IsMatch(UserName, pattern))
59
-                user = dBContext.Users.Where(u => u.EmailAddress == UserName).FirstOrDefault();
60
-            else
61
-                user = dBContext.Users.Where(u => u.Cellphone == UserName).FirstOrDefault();
62
-
63
-            if (user != null)
64
-            {
65
-                if (user.Password == Password)
66
-                {
67
-                    returnObject.user = user;
68
-                    returnObject.ResultString = "Access Granted";
69
-                }
70
-                else
71
-                    returnObject.ResultString = "Password incorrect";
72
-            }
73
-            else
74
-            {
75
-                returnObject.ResultString = "User not found";
76
-            }
77
-
78
-
79
-            return returnObject;
80
-        }
81
-
82
-        public void Remove(User user)
83
-        {
84
-            dBContext.Users.Remove(user);
85
-            Save();
86
-        }
87
-
88
-        public void Save()
89
-        {
90
-            dBContext.SaveChanges();
91
-        }
92
-
93
-        public void Update(User user)
94
-        {
95
-            dBContext.Entry(user).State = EntityState.Modified;
96
-            Save();
97
-        }
98
-    }
99
-}

+ 19
- 0
ProRestaurant/Repository/Restaurants/IMenuCategoryRepository.cs Parādīt failu

1
+using ProRestaurant.Models.Restaurants;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Linq;
5
+using System.Threading.Tasks;
6
+
7
+namespace ProRestaurant.Repository.Restaurants
8
+{
9
+    public interface IMenuCategoryRepository
10
+    {
11
+        IEnumerable<MenuCategory> GetMenuCategory();
12
+        IEnumerable<MenuCategory> GetMenuCategories(Func<MenuCategory, bool> where);
13
+        MenuCategory GetMenuCategory(Func<MenuCategory, bool> where);
14
+        void Insert(MenuCategory MenuCategory);
15
+        void Remove(MenuCategory MenuCategory);
16
+        void Update(MenuCategory MenuCategory);
17
+        void Save();
18
+    }
19
+}

+ 16
- 0
ProRestaurant/Repository/Restaurants/IRestaurantCategoryRepository.cs Parādīt failu

1
+using ProRestaurant.Models.Restaurants;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Threading.Tasks;
5
+
6
+namespace ProRestaurant.Repository.Restaurants
7
+{
8
+    public interface IRestaurantCategoryRepository
9
+    {
10
+        ICollection<RestaurantCategory> Get();
11
+        void Insert(RestaurantCategory RestaurantCategory);
12
+        void Update(RestaurantCategory RestaurantCategory);
13
+        void Remove(int id);
14
+        void Save();
15
+    }
16
+}

+ 4
- 3
ProRestaurant/Repository/Restaurants/IRestaurantRepository.cs Parādīt failu

1
-using ProRestaurant.Models.Restaurants;
1
+using ProRestaurant.Containers;
2
+using ProRestaurant.Models.Restaurants;
2
 using System;
3
 using System;
3
 using System.Collections.Generic;
4
 using System.Collections.Generic;
4
 using System.Linq;
5
 using System.Linq;
7
 namespace ProRestaurant.Repository.Restaurants
8
 namespace ProRestaurant.Repository.Restaurants
8
 {
9
 {
9
     public interface IRestaurantRepository
10
     public interface IRestaurantRepository
10
-    {
11
-        IEnumerable<Restaurant> GetUsers();
11
+    {        
12
+        List<RestaurantCard> GetSearch();
12
         Restaurant GetRestaurant(Func<Restaurant, bool> where);
13
         Restaurant GetRestaurant(Func<Restaurant, bool> where);
13
         void Insert(Restaurant restaurant);
14
         void Insert(Restaurant restaurant);
14
         void Remove(Restaurant restaurant);
15
         void Remove(Restaurant restaurant);

+ 58
- 0
ProRestaurant/Repository/Restaurants/MenuCategoryRepository.cs Parādīt failu

1
+using Microsoft.EntityFrameworkCore;
2
+using ProRestaurant.DBContexts;
3
+using ProRestaurant.Models.Restaurants;
4
+using System;
5
+using System.Collections.Generic;
6
+using System.Linq;
7
+using System.Threading.Tasks;
8
+
9
+namespace ProRestaurant.Repository.Restaurants
10
+{
11
+    public class MenuCategoryRepository : IMenuCategoryRepository
12
+    {
13
+        private readonly DBContext dBContext;
14
+
15
+        public MenuCategoryRepository(DBContext db)
16
+        {
17
+            dBContext = db;
18
+        }
19
+
20
+        public IEnumerable<MenuCategory> GetMenuCategory()
21
+        {
22
+            return dBContext.MenuCategories.ToList();
23
+        }
24
+
25
+        public IEnumerable<MenuCategory> GetMenuCategories(Func<MenuCategory, bool> where)
26
+        {
27
+            return dBContext.MenuCategories.Where(where).ToList();
28
+        }
29
+
30
+        public MenuCategory GetMenuCategory(Func<MenuCategory, bool> where)
31
+        {
32
+            return dBContext.MenuCategories.Where(where).FirstOrDefault();
33
+        }
34
+
35
+        public void Insert(MenuCategory MenuCategory)
36
+        {
37
+            dBContext.Add(MenuCategory);
38
+            Save();
39
+        }
40
+
41
+        public void Remove(MenuCategory MenuCategory)
42
+        {
43
+            dBContext.Remove(MenuCategory);
44
+            Save();
45
+        }
46
+
47
+        public void Save()
48
+        {
49
+            dBContext.SaveChanges();
50
+        }
51
+
52
+        public void Update(MenuCategory MenuCategory)
53
+        {
54
+            dBContext.Entry(MenuCategory).State = EntityState.Modified;
55
+            Save();
56
+        }
57
+    }
58
+}

+ 56
- 0
ProRestaurant/Repository/Restaurants/RestaurantCategoryRepository.cs Parādīt failu

1
+using Microsoft.EntityFrameworkCore;
2
+using ProRestaurant.Classes;
3
+using ProRestaurant.DBContexts;
4
+using ProRestaurant.Models.Restaurants;
5
+using System.Collections.Generic;
6
+using System.Linq;
7
+
8
+namespace ProRestaurant.Repository.Restaurants
9
+{
10
+    public class RestaurantCategoryRepository : IRestaurantCategoryRepository
11
+    {
12
+        private readonly DBContext dBContext;
13
+
14
+        public RestaurantCategoryRepository(DBContext _DB)
15
+        {
16
+            dBContext = _DB;
17
+        }
18
+
19
+        public ICollection<RestaurantCategory> Get()
20
+        {
21
+            var cats = dBContext.RestaurantCategories.OrderBy(c => c.Description).ToList();
22
+
23
+            foreach (var cat in cats)
24
+            {
25
+                if (!string.IsNullOrEmpty(cat.Image) && !cat.Image.Contains("data:image"))
26
+                    cat.Image = ImageFormatter.ImageToBase64(cat.Image);
27
+            }
28
+
29
+            return cats;
30
+        }
31
+
32
+        public void Insert(RestaurantCategory RestaurantCategory)
33
+        {
34
+            dBContext.Add(RestaurantCategory);
35
+            Save();
36
+        }
37
+
38
+        public void Remove(int id)
39
+        {
40
+            var category = dBContext.RestaurantCategories.Where(r => r.Id == id).FirstOrDefault();
41
+            dBContext.Remove(category);
42
+            Save();
43
+        }
44
+
45
+        public void Save()
46
+        {
47
+            dBContext.SaveChanges();
48
+        }
49
+
50
+        public void Update(RestaurantCategory RestaurantCategory)
51
+        {
52
+            dBContext.Entry(RestaurantCategory).State = EntityState.Modified;
53
+            Save();
54
+        }
55
+    }
56
+}

+ 32
- 3
ProRestaurant/Repository/Restaurants/RestaurantRepository.cs Parādīt failu

1
 using Microsoft.EntityFrameworkCore;
1
 using Microsoft.EntityFrameworkCore;
2
+using ProRestaurant.Classes;
3
+using ProRestaurant.Containers;
2
 using ProRestaurant.DBContexts;
4
 using ProRestaurant.DBContexts;
3
 using ProRestaurant.Models.Restaurants;
5
 using ProRestaurant.Models.Restaurants;
4
 using System;
6
 using System;
5
 using System.Collections.Generic;
7
 using System.Collections.Generic;
6
 using System.Linq;
8
 using System.Linq;
7
-using System.Threading.Tasks;
8
 
9
 
9
 namespace ProRestaurant.Repository.Restaurants
10
 namespace ProRestaurant.Repository.Restaurants
10
 {
11
 {
22
             return dBContext.Restaurants.Where(where).FirstOrDefault();
23
             return dBContext.Restaurants.Where(where).FirstOrDefault();
23
         }
24
         }
24
 
25
 
25
-        public IEnumerable<Restaurant> GetUsers()
26
+        public IEnumerable<Restaurant> GetRestaurants()
26
         {
27
         {
27
             return dBContext.Restaurants.ToList();
28
             return dBContext.Restaurants.ToList();
28
         }
29
         }
29
 
30
 
31
+        public List<RestaurantCard> GetSearch()
32
+        {
33
+            var restaurants = dBContext.Restaurants.ToList();
34
+
35
+            List<RestaurantCard> cards = new List<RestaurantCard>();
36
+
37
+            foreach (var rest in restaurants)
38
+            {
39
+                var card = new RestaurantCard
40
+                {
41
+                    Id = rest.Id,
42
+                    Name = rest.Name,
43
+                    Suburb = rest.Suburb,
44
+                    SubText = rest.Categories,
45
+                    DeliveryFee = string.Format("{0:C}", rest.DeliveryFee),
46
+                    DeliveryTime = rest.DeliveryTime
47
+                };
48
+                if (!rest.Logo.Contains("data:image"))
49
+                    card.Logo = ImageFormatter.ImageToBase64(rest.Logo);
50
+                else
51
+                    card.Logo = rest.Logo;
52
+
53
+                cards.Add(card);
54
+            }
55
+
56
+            return cards;
57
+        }
58
+
30
         public void Insert(Restaurant restaurant)
59
         public void Insert(Restaurant restaurant)
31
         {
60
         {
32
             dBContext.Add(restaurant);
61
             dBContext.Add(restaurant);
48
         {
77
         {
49
             dBContext.Entry(restaurant).State = EntityState.Modified;
78
             dBContext.Entry(restaurant).State = EntityState.Modified;
50
             Save();
79
             Save();
51
-        }
80
+        }        
52
     }
81
     }
53
 }
82
 }

+ 40
- 2
ProRestaurant/Startup.cs Parādīt failu

1
 using System;
1
 using System;
2
 using System.Collections.Generic;
2
 using System.Collections.Generic;
3
 using System.Linq;
3
 using System.Linq;
4
+using System.Text;
4
 using System.Threading.Tasks;
5
 using System.Threading.Tasks;
6
+using Microsoft.AspNetCore.Authentication.JwtBearer;
5
 using Microsoft.AspNetCore.Builder;
7
 using Microsoft.AspNetCore.Builder;
6
 using Microsoft.AspNetCore.Hosting;
8
 using Microsoft.AspNetCore.Hosting;
7
 using Microsoft.AspNetCore.HttpsPolicy;
9
 using Microsoft.AspNetCore.HttpsPolicy;
12
 using Microsoft.Extensions.DependencyInjection;
14
 using Microsoft.Extensions.DependencyInjection;
13
 using Microsoft.Extensions.Logging;
15
 using Microsoft.Extensions.Logging;
14
 using Microsoft.Extensions.Options;
16
 using Microsoft.Extensions.Options;
17
+using Microsoft.IdentityModel.Tokens;
18
+using ProRestaurant.Classes;
15
 using ProRestaurant.DBContexts;
19
 using ProRestaurant.DBContexts;
16
 using ProRestaurant.Repository.Accounts;
20
 using ProRestaurant.Repository.Accounts;
21
+using ProRestaurant.Repository.Restaurants;
17
 
22
 
18
 namespace ProRestaurant
23
 namespace ProRestaurant
19
 {
24
 {
35
                        .AllowAnyHeader();
40
                        .AllowAnyHeader();
36
             }));
41
             }));
37
             services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
42
             services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
38
-            services.AddDbContext<DBContext>(o => o.UseSqlServer(Configuration.GetConnectionString("DefaultDatabase")));
39
 
43
 
40
-            services.AddTransient<IUserRepository, UserRepository>();
44
+            #region Authentication Setup
45
+            // configure strongly typed settings objects
46
+            var appSettingsSection = Configuration.GetSection("AppSettings");
47
+            services.Configure<AppSettings>(appSettingsSection);
41
 
48
 
49
+            // configure jwt authentication
50
+            var appSettings = appSettingsSection.Get<AppSettings>();
51
+            var key = Encoding.ASCII.GetBytes(appSettings.Secret);
52
+            services.AddAuthentication(x =>
53
+            {
54
+                x.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
55
+                x.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
56
+            })
57
+            .AddJwtBearer(x =>
58
+            {
59
+                x.RequireHttpsMetadata = false;
60
+                x.SaveToken = true;
61
+                x.TokenValidationParameters = new TokenValidationParameters
62
+                {
63
+                    ValidateIssuerSigningKey = true,
64
+                    IssuerSigningKey = new SymmetricSecurityKey(key),
65
+                    ValidateIssuer = false,
66
+                    ValidateAudience = false
67
+                };
68
+            });
69
+
70
+            // configure DI for application services
71
+            services.AddScoped<IAuthenticateRepository, AuthenticateRepository>();
72
+            #endregion
73
+
74
+
75
+            services.AddDbContext<DBContext>(o => o.UseSqlServer(Configuration.GetConnectionString("DefaultDatabase")));           
76
+
77
+            services.AddTransient<IRegistrationRepository, RegistrationRepository>();
78
+            services.AddTransient<IRestaurantCategoryRepository, RestaurantCategoryRepository>();
79
+            services.AddTransient<IRestaurantRepository, RestaurantRepository>();
42
 
80
 
43
             services.Configure<MvcOptions>(options =>
81
             services.Configure<MvcOptions>(options =>
44
             {
82
             {

+ 4
- 1
ProRestaurant/appsettings.json Parādīt failu

1
-{
1
+{
2
+  "AppSettings": {
3
+    "Secret": "≡∆≤≥√∞ProVision!"
4
+  },
2
   "Logging": {
5
   "Logging": {
3
     "LogLevel": {
6
     "LogLevel": {
4
       "Default": "Warning"
7
       "Default": "Warning"

+ 182
- 48
ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.deps.json Parādīt failu

29
           "Microsoft.EntityFrameworkCore": "2.2.0",
29
           "Microsoft.EntityFrameworkCore": "2.2.0",
30
           "Microsoft.EntityFrameworkCore.SqlServer": "2.2.0",
30
           "Microsoft.EntityFrameworkCore.SqlServer": "2.2.0",
31
           "Microsoft.NETCore.App": "2.2.0",
31
           "Microsoft.NETCore.App": "2.2.0",
32
-          "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0"
32
+          "Npgsql.EntityFrameworkCore.PostgreSQL": "2.2.0",
33
+          "System.Data.SQLite": "1.0.113.1",
34
+          "System.Drawing.Common": "4.7.0"
33
         },
35
         },
34
         "runtime": {
36
         "runtime": {
35
           "ProRestaurant.dll": {}
37
           "ProRestaurant.dll": {}
38
           "ProRestaurant.dll": {}
40
           "ProRestaurant.dll": {}
39
         }
41
         }
40
       },
42
       },
43
+      "Microsoft.NETCore.Platforms/3.1.0": {},
44
+      "Microsoft.Win32.SystemEvents/4.7.0": {
45
+        "dependencies": {
46
+          "Microsoft.NETCore.Platforms": "3.1.0"
47
+        },
48
+        "runtime": {
49
+          "lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll": {
50
+            "assemblyVersion": "4.0.2.0",
51
+            "fileVersion": "4.700.19.56404"
52
+          }
53
+        },
54
+        "runtimeTargets": {
55
+          "runtimes/win/lib/netcoreapp2.0/Microsoft.Win32.SystemEvents.dll": {
56
+            "rid": "win",
57
+            "assetType": "runtime",
58
+            "assemblyVersion": "4.0.2.0",
59
+            "fileVersion": "4.700.19.56404"
60
+          }
61
+        }
62
+      },
41
       "Npgsql/4.0.4": {
63
       "Npgsql/4.0.4": {
42
         "dependencies": {
64
         "dependencies": {
43
           "System.Runtime.CompilerServices.Unsafe": "4.5.1",
65
           "System.Runtime.CompilerServices.Unsafe": "4.5.1",
71
           "lib/netstandard2.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll": {}
93
           "lib/netstandard2.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll": {}
72
         }
94
         }
73
       },
95
       },
96
+      "System.Data.SQLite/1.0.113.1": {
97
+        "dependencies": {
98
+          "System.Data.SQLite.Core": "1.0.113.1"
99
+        }
100
+      },
101
+      "System.Data.SQLite.Core/1.0.113.1": {
102
+        "runtime": {
103
+          "lib/netstandard2.0/System.Data.SQLite.dll": {
104
+            "assemblyVersion": "1.0.113.0",
105
+            "fileVersion": "1.0.113.0"
106
+          }
107
+        },
108
+        "runtimeTargets": {
109
+          "runtimes/linux-x64/native/netstandard2.0/SQLite.Interop.dll": {
110
+            "rid": "linux-x64",
111
+            "assetType": "native",
112
+            "fileVersion": "0.0.0.0"
113
+          },
114
+          "runtimes/linux-x64/native/netstandard2.1/SQLite.Interop.dll": {
115
+            "rid": "linux-x64",
116
+            "assetType": "native",
117
+            "fileVersion": "0.0.0.0"
118
+          },
119
+          "runtimes/osx-x64/native/netstandard2.0/SQLite.Interop.dll": {
120
+            "rid": "osx-x64",
121
+            "assetType": "native",
122
+            "fileVersion": "0.0.0.0"
123
+          },
124
+          "runtimes/osx-x64/native/netstandard2.1/SQLite.Interop.dll": {
125
+            "rid": "osx-x64",
126
+            "assetType": "native",
127
+            "fileVersion": "0.0.0.0"
128
+          },
129
+          "runtimes/win-x64/native/netstandard2.0/SQLite.Interop.dll": {
130
+            "rid": "win-x64",
131
+            "assetType": "native",
132
+            "fileVersion": "1.0.113.0"
133
+          },
134
+          "runtimes/win-x64/native/netstandard2.1/SQLite.Interop.dll": {
135
+            "rid": "win-x64",
136
+            "assetType": "native",
137
+            "fileVersion": "1.0.113.0"
138
+          },
139
+          "runtimes/win-x86/native/netstandard2.0/SQLite.Interop.dll": {
140
+            "rid": "win-x86",
141
+            "assetType": "native",
142
+            "fileVersion": "1.0.113.0"
143
+          },
144
+          "runtimes/win-x86/native/netstandard2.1/SQLite.Interop.dll": {
145
+            "rid": "win-x86",
146
+            "assetType": "native",
147
+            "fileVersion": "1.0.113.0"
148
+          }
149
+        },
150
+        "compile": {
151
+          "lib/netstandard2.0/System.Data.SQLite.dll": {}
152
+        }
153
+      },
154
+      "System.Drawing.Common/4.7.0": {
155
+        "dependencies": {
156
+          "Microsoft.NETCore.Platforms": "3.1.0",
157
+          "Microsoft.Win32.SystemEvents": "4.7.0"
158
+        },
159
+        "runtime": {
160
+          "lib/netstandard2.0/System.Drawing.Common.dll": {
161
+            "assemblyVersion": "4.0.0.1",
162
+            "fileVersion": "4.6.26919.2"
163
+          }
164
+        },
165
+        "runtimeTargets": {
166
+          "runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll": {
167
+            "rid": "unix",
168
+            "assetType": "runtime",
169
+            "assemblyVersion": "4.0.0.1",
170
+            "fileVersion": "4.6.26919.2"
171
+          },
172
+          "runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll": {
173
+            "rid": "win",
174
+            "assetType": "runtime",
175
+            "assemblyVersion": "4.0.0.1",
176
+            "fileVersion": "4.6.26919.2"
177
+          }
178
+        },
179
+        "compile": {
180
+          "ref/netstandard2.0/System.Drawing.Common.dll": {}
181
+        }
182
+      },
74
       "System.ValueTuple/4.5.0": {},
183
       "System.ValueTuple/4.5.0": {},
75
       "Microsoft.AspNet.WebApi.Client/5.2.6": {
184
       "Microsoft.AspNet.WebApi.Client/5.2.6": {
76
         "dependencies": {
185
         "dependencies": {
2032
       "Microsoft.NETCore.App/2.2.0": {
2141
       "Microsoft.NETCore.App/2.2.0": {
2033
         "dependencies": {
2142
         "dependencies": {
2034
           "Microsoft.NETCore.DotNetHostPolicy": "2.2.0",
2143
           "Microsoft.NETCore.DotNetHostPolicy": "2.2.0",
2035
-          "Microsoft.NETCore.Platforms": "2.2.0",
2144
+          "Microsoft.NETCore.Platforms": "3.1.0",
2036
           "Microsoft.NETCore.Targets": "2.0.0",
2145
           "Microsoft.NETCore.Targets": "2.0.0",
2037
           "NETStandard.Library": "2.0.3"
2146
           "NETStandard.Library": "2.0.3"
2038
         },
2147
         },
2198
         },
2307
         },
2199
         "compileOnly": true
2308
         "compileOnly": true
2200
       },
2309
       },
2201
-      "Microsoft.NETCore.Platforms/2.2.0": {
2202
-        "compileOnly": true
2203
-      },
2204
       "Microsoft.NETCore.Targets/2.0.0": {
2310
       "Microsoft.NETCore.Targets/2.0.0": {
2205
         "compileOnly": true
2311
         "compileOnly": true
2206
       },
2312
       },
2216
       },
2322
       },
2217
       "NETStandard.Library/2.0.3": {
2323
       "NETStandard.Library/2.0.3": {
2218
         "dependencies": {
2324
         "dependencies": {
2219
-          "Microsoft.NETCore.Platforms": "2.2.0"
2325
+          "Microsoft.NETCore.Platforms": "3.1.0"
2220
         },
2326
         },
2221
         "compileOnly": true
2327
         "compileOnly": true
2222
       },
2328
       },
2266
       },
2372
       },
2267
       "runtime.native.System/4.3.0": {
2373
       "runtime.native.System/4.3.0": {
2268
         "dependencies": {
2374
         "dependencies": {
2269
-          "Microsoft.NETCore.Platforms": "2.2.0",
2375
+          "Microsoft.NETCore.Platforms": "3.1.0",
2270
           "Microsoft.NETCore.Targets": "2.0.0"
2376
           "Microsoft.NETCore.Targets": "2.0.0"
2271
         },
2377
         },
2272
         "compileOnly": true
2378
         "compileOnly": true
2281
       },
2387
       },
2282
       "runtime.native.System.IO.Compression/4.3.0": {
2388
       "runtime.native.System.IO.Compression/4.3.0": {
2283
         "dependencies": {
2389
         "dependencies": {
2284
-          "Microsoft.NETCore.Platforms": "2.2.0",
2390
+          "Microsoft.NETCore.Platforms": "3.1.0",
2285
           "Microsoft.NETCore.Targets": "2.0.0"
2391
           "Microsoft.NETCore.Targets": "2.0.0"
2286
         },
2392
         },
2287
         "compileOnly": true
2393
         "compileOnly": true
2288
       },
2394
       },
2289
       "runtime.native.System.Net.Http/4.3.0": {
2395
       "runtime.native.System.Net.Http/4.3.0": {
2290
         "dependencies": {
2396
         "dependencies": {
2291
-          "Microsoft.NETCore.Platforms": "2.2.0",
2397
+          "Microsoft.NETCore.Platforms": "3.1.0",
2292
           "Microsoft.NETCore.Targets": "2.0.0"
2398
           "Microsoft.NETCore.Targets": "2.0.0"
2293
         },
2399
         },
2294
         "compileOnly": true
2400
         "compileOnly": true
2358
       },
2464
       },
2359
       "System.Collections/4.3.0": {
2465
       "System.Collections/4.3.0": {
2360
         "dependencies": {
2466
         "dependencies": {
2361
-          "Microsoft.NETCore.Platforms": "2.2.0",
2467
+          "Microsoft.NETCore.Platforms": "3.1.0",
2362
           "Microsoft.NETCore.Targets": "2.0.0",
2468
           "Microsoft.NETCore.Targets": "2.0.0",
2363
           "System.Runtime": "4.3.0"
2469
           "System.Runtime": "4.3.0"
2364
         },
2470
         },
2410
       },
2516
       },
2411
       "System.Console/4.3.0": {
2517
       "System.Console/4.3.0": {
2412
         "dependencies": {
2518
         "dependencies": {
2413
-          "Microsoft.NETCore.Platforms": "2.2.0",
2519
+          "Microsoft.NETCore.Platforms": "3.1.0",
2414
           "Microsoft.NETCore.Targets": "2.0.0",
2520
           "Microsoft.NETCore.Targets": "2.0.0",
2415
           "System.IO": "4.3.0",
2521
           "System.IO": "4.3.0",
2416
           "System.Runtime": "4.3.0",
2522
           "System.Runtime": "4.3.0",
2438
       },
2544
       },
2439
       "System.Diagnostics.Debug/4.3.0": {
2545
       "System.Diagnostics.Debug/4.3.0": {
2440
         "dependencies": {
2546
         "dependencies": {
2441
-          "Microsoft.NETCore.Platforms": "2.2.0",
2547
+          "Microsoft.NETCore.Platforms": "3.1.0",
2442
           "Microsoft.NETCore.Targets": "2.0.0",
2548
           "Microsoft.NETCore.Targets": "2.0.0",
2443
           "System.Runtime": "4.3.0"
2549
           "System.Runtime": "4.3.0"
2444
         },
2550
         },
2449
       },
2555
       },
2450
       "System.Diagnostics.FileVersionInfo/4.3.0": {
2556
       "System.Diagnostics.FileVersionInfo/4.3.0": {
2451
         "dependencies": {
2557
         "dependencies": {
2452
-          "Microsoft.NETCore.Platforms": "2.2.0",
2558
+          "Microsoft.NETCore.Platforms": "3.1.0",
2453
           "System.Globalization": "4.3.0",
2559
           "System.Globalization": "4.3.0",
2454
           "System.IO": "4.3.0",
2560
           "System.IO": "4.3.0",
2455
           "System.IO.FileSystem": "4.3.0",
2561
           "System.IO.FileSystem": "4.3.0",
2472
       },
2578
       },
2473
       "System.Diagnostics.Tools/4.3.0": {
2579
       "System.Diagnostics.Tools/4.3.0": {
2474
         "dependencies": {
2580
         "dependencies": {
2475
-          "Microsoft.NETCore.Platforms": "2.2.0",
2581
+          "Microsoft.NETCore.Platforms": "3.1.0",
2476
           "Microsoft.NETCore.Targets": "2.0.0",
2582
           "Microsoft.NETCore.Targets": "2.0.0",
2477
           "System.Runtime": "4.3.0"
2583
           "System.Runtime": "4.3.0"
2478
         },
2584
         },
2480
       },
2586
       },
2481
       "System.Diagnostics.Tracing/4.3.0": {
2587
       "System.Diagnostics.Tracing/4.3.0": {
2482
         "dependencies": {
2588
         "dependencies": {
2483
-          "Microsoft.NETCore.Platforms": "2.2.0",
2589
+          "Microsoft.NETCore.Platforms": "3.1.0",
2484
           "Microsoft.NETCore.Targets": "2.0.0",
2590
           "Microsoft.NETCore.Targets": "2.0.0",
2485
           "System.Runtime": "4.3.0"
2591
           "System.Runtime": "4.3.0"
2486
         },
2592
         },
2507
       },
2613
       },
2508
       "System.Globalization/4.3.0": {
2614
       "System.Globalization/4.3.0": {
2509
         "dependencies": {
2615
         "dependencies": {
2510
-          "Microsoft.NETCore.Platforms": "2.2.0",
2616
+          "Microsoft.NETCore.Platforms": "3.1.0",
2511
           "Microsoft.NETCore.Targets": "2.0.0",
2617
           "Microsoft.NETCore.Targets": "2.0.0",
2512
           "System.Runtime": "4.3.0"
2618
           "System.Runtime": "4.3.0"
2513
         },
2619
         },
2515
       },
2621
       },
2516
       "System.Globalization.Calendars/4.3.0": {
2622
       "System.Globalization.Calendars/4.3.0": {
2517
         "dependencies": {
2623
         "dependencies": {
2518
-          "Microsoft.NETCore.Platforms": "2.2.0",
2624
+          "Microsoft.NETCore.Platforms": "3.1.0",
2519
           "Microsoft.NETCore.Targets": "2.0.0",
2625
           "Microsoft.NETCore.Targets": "2.0.0",
2520
           "System.Globalization": "4.3.0",
2626
           "System.Globalization": "4.3.0",
2521
           "System.Runtime": "4.3.0"
2627
           "System.Runtime": "4.3.0"
2524
       },
2630
       },
2525
       "System.Globalization.Extensions/4.3.0": {
2631
       "System.Globalization.Extensions/4.3.0": {
2526
         "dependencies": {
2632
         "dependencies": {
2527
-          "Microsoft.NETCore.Platforms": "2.2.0",
2633
+          "Microsoft.NETCore.Platforms": "3.1.0",
2528
           "System.Globalization": "4.3.0",
2634
           "System.Globalization": "4.3.0",
2529
           "System.Resources.ResourceManager": "4.3.0",
2635
           "System.Resources.ResourceManager": "4.3.0",
2530
           "System.Runtime": "4.3.0",
2636
           "System.Runtime": "4.3.0",
2552
       },
2658
       },
2553
       "System.IO/4.3.0": {
2659
       "System.IO/4.3.0": {
2554
         "dependencies": {
2660
         "dependencies": {
2555
-          "Microsoft.NETCore.Platforms": "2.2.0",
2661
+          "Microsoft.NETCore.Platforms": "3.1.0",
2556
           "Microsoft.NETCore.Targets": "2.0.0",
2662
           "Microsoft.NETCore.Targets": "2.0.0",
2557
           "System.Runtime": "4.3.0",
2663
           "System.Runtime": "4.3.0",
2558
           "System.Text.Encoding": "4.3.0",
2664
           "System.Text.Encoding": "4.3.0",
2562
       },
2668
       },
2563
       "System.IO.Compression/4.3.0": {
2669
       "System.IO.Compression/4.3.0": {
2564
         "dependencies": {
2670
         "dependencies": {
2565
-          "Microsoft.NETCore.Platforms": "2.2.0",
2671
+          "Microsoft.NETCore.Platforms": "3.1.0",
2566
           "System.Buffers": "4.5.0",
2672
           "System.Buffers": "4.5.0",
2567
           "System.Collections": "4.3.0",
2673
           "System.Collections": "4.3.0",
2568
           "System.Diagnostics.Debug": "4.3.0",
2674
           "System.Diagnostics.Debug": "4.3.0",
2582
       },
2688
       },
2583
       "System.IO.FileSystem/4.3.0": {
2689
       "System.IO.FileSystem/4.3.0": {
2584
         "dependencies": {
2690
         "dependencies": {
2585
-          "Microsoft.NETCore.Platforms": "2.2.0",
2691
+          "Microsoft.NETCore.Platforms": "3.1.0",
2586
           "Microsoft.NETCore.Targets": "2.0.0",
2692
           "Microsoft.NETCore.Targets": "2.0.0",
2587
           "System.IO": "4.3.0",
2693
           "System.IO": "4.3.0",
2588
           "System.IO.FileSystem.Primitives": "4.3.0",
2694
           "System.IO.FileSystem.Primitives": "4.3.0",
2655
       },
2761
       },
2656
       "System.Net.Http/4.3.0": {
2762
       "System.Net.Http/4.3.0": {
2657
         "dependencies": {
2763
         "dependencies": {
2658
-          "Microsoft.NETCore.Platforms": "2.2.0",
2764
+          "Microsoft.NETCore.Platforms": "3.1.0",
2659
           "System.Collections": "4.3.0",
2765
           "System.Collections": "4.3.0",
2660
           "System.Diagnostics.Debug": "4.3.0",
2766
           "System.Diagnostics.Debug": "4.3.0",
2661
           "System.Diagnostics.DiagnosticSource": "4.5.0",
2767
           "System.Diagnostics.DiagnosticSource": "4.5.0",
2686
       },
2792
       },
2687
       "System.Net.Primitives/4.3.0": {
2793
       "System.Net.Primitives/4.3.0": {
2688
         "dependencies": {
2794
         "dependencies": {
2689
-          "Microsoft.NETCore.Platforms": "2.2.0",
2795
+          "Microsoft.NETCore.Platforms": "3.1.0",
2690
           "Microsoft.NETCore.Targets": "2.0.0",
2796
           "Microsoft.NETCore.Targets": "2.0.0",
2691
           "System.Runtime": "4.3.0",
2797
           "System.Runtime": "4.3.0",
2692
           "System.Runtime.Handles": "4.3.0"
2798
           "System.Runtime.Handles": "4.3.0"
2744
       },
2850
       },
2745
       "System.Reflection/4.3.0": {
2851
       "System.Reflection/4.3.0": {
2746
         "dependencies": {
2852
         "dependencies": {
2747
-          "Microsoft.NETCore.Platforms": "2.2.0",
2853
+          "Microsoft.NETCore.Platforms": "3.1.0",
2748
           "Microsoft.NETCore.Targets": "2.0.0",
2854
           "Microsoft.NETCore.Targets": "2.0.0",
2749
           "System.IO": "4.3.0",
2855
           "System.IO": "4.3.0",
2750
           "System.Reflection.Primitives": "4.3.0",
2856
           "System.Reflection.Primitives": "4.3.0",
2781
       },
2887
       },
2782
       "System.Reflection.Extensions/4.3.0": {
2888
       "System.Reflection.Extensions/4.3.0": {
2783
         "dependencies": {
2889
         "dependencies": {
2784
-          "Microsoft.NETCore.Platforms": "2.2.0",
2890
+          "Microsoft.NETCore.Platforms": "3.1.0",
2785
           "Microsoft.NETCore.Targets": "2.0.0",
2891
           "Microsoft.NETCore.Targets": "2.0.0",
2786
           "System.Reflection": "4.3.0",
2892
           "System.Reflection": "4.3.0",
2787
           "System.Runtime": "4.3.0"
2893
           "System.Runtime": "4.3.0"
2793
       },
2899
       },
2794
       "System.Reflection.Primitives/4.3.0": {
2900
       "System.Reflection.Primitives/4.3.0": {
2795
         "dependencies": {
2901
         "dependencies": {
2796
-          "Microsoft.NETCore.Platforms": "2.2.0",
2902
+          "Microsoft.NETCore.Platforms": "3.1.0",
2797
           "Microsoft.NETCore.Targets": "2.0.0",
2903
           "Microsoft.NETCore.Targets": "2.0.0",
2798
           "System.Runtime": "4.3.0"
2904
           "System.Runtime": "4.3.0"
2799
         },
2905
         },
2808
       },
2914
       },
2809
       "System.Resources.ResourceManager/4.3.0": {
2915
       "System.Resources.ResourceManager/4.3.0": {
2810
         "dependencies": {
2916
         "dependencies": {
2811
-          "Microsoft.NETCore.Platforms": "2.2.0",
2917
+          "Microsoft.NETCore.Platforms": "3.1.0",
2812
           "Microsoft.NETCore.Targets": "2.0.0",
2918
           "Microsoft.NETCore.Targets": "2.0.0",
2813
           "System.Globalization": "4.3.0",
2919
           "System.Globalization": "4.3.0",
2814
           "System.Reflection": "4.3.0",
2920
           "System.Reflection": "4.3.0",
2818
       },
2924
       },
2819
       "System.Runtime/4.3.0": {
2925
       "System.Runtime/4.3.0": {
2820
         "dependencies": {
2926
         "dependencies": {
2821
-          "Microsoft.NETCore.Platforms": "2.2.0",
2927
+          "Microsoft.NETCore.Platforms": "3.1.0",
2822
           "Microsoft.NETCore.Targets": "2.0.0"
2928
           "Microsoft.NETCore.Targets": "2.0.0"
2823
         },
2929
         },
2824
         "compileOnly": true
2930
         "compileOnly": true
2831
       },
2937
       },
2832
       "System.Runtime.Extensions/4.3.0": {
2938
       "System.Runtime.Extensions/4.3.0": {
2833
         "dependencies": {
2939
         "dependencies": {
2834
-          "Microsoft.NETCore.Platforms": "2.2.0",
2940
+          "Microsoft.NETCore.Platforms": "3.1.0",
2835
           "Microsoft.NETCore.Targets": "2.0.0",
2941
           "Microsoft.NETCore.Targets": "2.0.0",
2836
           "System.Runtime": "4.3.0"
2942
           "System.Runtime": "4.3.0"
2837
         },
2943
         },
2839
       },
2945
       },
2840
       "System.Runtime.Handles/4.3.0": {
2946
       "System.Runtime.Handles/4.3.0": {
2841
         "dependencies": {
2947
         "dependencies": {
2842
-          "Microsoft.NETCore.Platforms": "2.2.0",
2948
+          "Microsoft.NETCore.Platforms": "3.1.0",
2843
           "Microsoft.NETCore.Targets": "2.0.0",
2949
           "Microsoft.NETCore.Targets": "2.0.0",
2844
           "System.Runtime": "4.3.0"
2950
           "System.Runtime": "4.3.0"
2845
         },
2951
         },
2847
       },
2953
       },
2848
       "System.Runtime.InteropServices/4.3.0": {
2954
       "System.Runtime.InteropServices/4.3.0": {
2849
         "dependencies": {
2955
         "dependencies": {
2850
-          "Microsoft.NETCore.Platforms": "2.2.0",
2956
+          "Microsoft.NETCore.Platforms": "3.1.0",
2851
           "Microsoft.NETCore.Targets": "2.0.0",
2957
           "Microsoft.NETCore.Targets": "2.0.0",
2852
           "System.Reflection": "4.3.0",
2958
           "System.Reflection": "4.3.0",
2853
           "System.Reflection.Primitives": "4.3.0",
2959
           "System.Reflection.Primitives": "4.3.0",
2897
       },
3003
       },
2898
       "System.Security.AccessControl/4.5.0": {
3004
       "System.Security.AccessControl/4.5.0": {
2899
         "dependencies": {
3005
         "dependencies": {
2900
-          "Microsoft.NETCore.Platforms": "2.2.0",
3006
+          "Microsoft.NETCore.Platforms": "3.1.0",
2901
           "System.Security.Principal.Windows": "4.5.0"
3007
           "System.Security.Principal.Windows": "4.5.0"
2902
         },
3008
         },
2903
         "compile": {
3009
         "compile": {
2919
       },
3025
       },
2920
       "System.Security.Cryptography.Algorithms/4.3.0": {
3026
       "System.Security.Cryptography.Algorithms/4.3.0": {
2921
         "dependencies": {
3027
         "dependencies": {
2922
-          "Microsoft.NETCore.Platforms": "2.2.0",
3028
+          "Microsoft.NETCore.Platforms": "3.1.0",
2923
           "System.Collections": "4.3.0",
3029
           "System.Collections": "4.3.0",
2924
           "System.IO": "4.3.0",
3030
           "System.IO": "4.3.0",
2925
           "System.Resources.ResourceManager": "4.3.0",
3031
           "System.Resources.ResourceManager": "4.3.0",
2944
       },
3050
       },
2945
       "System.Security.Cryptography.Csp/4.3.0": {
3051
       "System.Security.Cryptography.Csp/4.3.0": {
2946
         "dependencies": {
3052
         "dependencies": {
2947
-          "Microsoft.NETCore.Platforms": "2.2.0",
3053
+          "Microsoft.NETCore.Platforms": "3.1.0",
2948
           "System.IO": "4.3.0",
3054
           "System.IO": "4.3.0",
2949
           "System.Reflection": "4.3.0",
3055
           "System.Reflection": "4.3.0",
2950
           "System.Resources.ResourceManager": "4.3.0",
3056
           "System.Resources.ResourceManager": "4.3.0",
2962
       },
3068
       },
2963
       "System.Security.Cryptography.Encoding/4.3.0": {
3069
       "System.Security.Cryptography.Encoding/4.3.0": {
2964
         "dependencies": {
3070
         "dependencies": {
2965
-          "Microsoft.NETCore.Platforms": "2.2.0",
3071
+          "Microsoft.NETCore.Platforms": "3.1.0",
2966
           "System.Collections": "4.3.0",
3072
           "System.Collections": "4.3.0",
2967
           "System.Collections.Concurrent": "4.3.0",
3073
           "System.Collections.Concurrent": "4.3.0",
2968
           "System.Linq": "4.3.0",
3074
           "System.Linq": "4.3.0",
3015
       },
3121
       },
3016
       "System.Security.Cryptography.X509Certificates/4.3.0": {
3122
       "System.Security.Cryptography.X509Certificates/4.3.0": {
3017
         "dependencies": {
3123
         "dependencies": {
3018
-          "Microsoft.NETCore.Platforms": "2.2.0",
3124
+          "Microsoft.NETCore.Platforms": "3.1.0",
3019
           "System.Collections": "4.3.0",
3125
           "System.Collections": "4.3.0",
3020
           "System.Diagnostics.Debug": "4.3.0",
3126
           "System.Diagnostics.Debug": "4.3.0",
3021
           "System.Globalization": "4.3.0",
3127
           "System.Globalization": "4.3.0",
3070
       },
3176
       },
3071
       "System.Security.Principal.Windows/4.5.0": {
3177
       "System.Security.Principal.Windows/4.5.0": {
3072
         "dependencies": {
3178
         "dependencies": {
3073
-          "Microsoft.NETCore.Platforms": "2.2.0"
3179
+          "Microsoft.NETCore.Platforms": "3.1.0"
3074
         },
3180
         },
3075
         "compile": {
3181
         "compile": {
3076
           "ref/netstandard2.0/System.Security.Principal.Windows.dll": {}
3182
           "ref/netstandard2.0/System.Security.Principal.Windows.dll": {}
3079
       },
3185
       },
3080
       "System.Text.Encoding/4.3.0": {
3186
       "System.Text.Encoding/4.3.0": {
3081
         "dependencies": {
3187
         "dependencies": {
3082
-          "Microsoft.NETCore.Platforms": "2.2.0",
3188
+          "Microsoft.NETCore.Platforms": "3.1.0",
3083
           "Microsoft.NETCore.Targets": "2.0.0",
3189
           "Microsoft.NETCore.Targets": "2.0.0",
3084
           "System.Runtime": "4.3.0"
3190
           "System.Runtime": "4.3.0"
3085
         },
3191
         },
3087
       },
3193
       },
3088
       "System.Text.Encoding.CodePages/4.5.0": {
3194
       "System.Text.Encoding.CodePages/4.5.0": {
3089
         "dependencies": {
3195
         "dependencies": {
3090
-          "Microsoft.NETCore.Platforms": "2.2.0",
3196
+          "Microsoft.NETCore.Platforms": "3.1.0",
3091
           "System.Runtime.CompilerServices.Unsafe": "4.5.1"
3197
           "System.Runtime.CompilerServices.Unsafe": "4.5.1"
3092
         },
3198
         },
3093
         "compileOnly": true
3199
         "compileOnly": true
3094
       },
3200
       },
3095
       "System.Text.Encoding.Extensions/4.3.0": {
3201
       "System.Text.Encoding.Extensions/4.3.0": {
3096
         "dependencies": {
3202
         "dependencies": {
3097
-          "Microsoft.NETCore.Platforms": "2.2.0",
3203
+          "Microsoft.NETCore.Platforms": "3.1.0",
3098
           "Microsoft.NETCore.Targets": "2.0.0",
3204
           "Microsoft.NETCore.Targets": "2.0.0",
3099
           "System.Runtime": "4.3.0",
3205
           "System.Runtime": "4.3.0",
3100
           "System.Text.Encoding": "4.3.0"
3206
           "System.Text.Encoding": "4.3.0"
3128
       },
3234
       },
3129
       "System.Threading.Tasks/4.3.0": {
3235
       "System.Threading.Tasks/4.3.0": {
3130
         "dependencies": {
3236
         "dependencies": {
3131
-          "Microsoft.NETCore.Platforms": "2.2.0",
3237
+          "Microsoft.NETCore.Platforms": "3.1.0",
3132
           "Microsoft.NETCore.Targets": "2.0.0",
3238
           "Microsoft.NETCore.Targets": "2.0.0",
3133
           "System.Runtime": "4.3.0"
3239
           "System.Runtime": "4.3.0"
3134
         },
3240
         },
3266
       "serviceable": false,
3372
       "serviceable": false,
3267
       "sha512": ""
3373
       "sha512": ""
3268
     },
3374
     },
3375
+    "Microsoft.NETCore.Platforms/3.1.0": {
3376
+      "type": "package",
3377
+      "serviceable": true,
3378
+      "sha512": "sha512-z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
3379
+      "path": "microsoft.netcore.platforms/3.1.0",
3380
+      "hashPath": "microsoft.netcore.platforms.3.1.0.nupkg.sha512"
3381
+    },
3382
+    "Microsoft.Win32.SystemEvents/4.7.0": {
3383
+      "type": "package",
3384
+      "serviceable": true,
3385
+      "sha512": "sha512-mtVirZr++rq+XCDITMUdnETD59XoeMxSpLRIII7JRI6Yj0LEDiO1pPn0ktlnIj12Ix8bfvQqQDMMIF9wC98oCA==",
3386
+      "path": "microsoft.win32.systemevents/4.7.0",
3387
+      "hashPath": "microsoft.win32.systemevents.4.7.0.nupkg.sha512"
3388
+    },
3269
     "Npgsql/4.0.4": {
3389
     "Npgsql/4.0.4": {
3270
       "type": "package",
3390
       "type": "package",
3271
       "serviceable": true,
3391
       "serviceable": true,
3280
       "path": "npgsql.entityframeworkcore.postgresql/2.2.0",
3400
       "path": "npgsql.entityframeworkcore.postgresql/2.2.0",
3281
       "hashPath": "npgsql.entityframeworkcore.postgresql.2.2.0.nupkg.sha512"
3401
       "hashPath": "npgsql.entityframeworkcore.postgresql.2.2.0.nupkg.sha512"
3282
     },
3402
     },
3403
+    "System.Data.SQLite/1.0.113.1": {
3404
+      "type": "package",
3405
+      "serviceable": true,
3406
+      "sha512": "sha512-80q28QKsEebMm1PhCBEKFoxTYiE6P1YtA+5IVlBeBxgB8LwDgbaAml6RIfGu719JoRtbmNqtLdhDA8jj84s0gA==",
3407
+      "path": "system.data.sqlite/1.0.113.1",
3408
+      "hashPath": "system.data.sqlite.1.0.113.1.nupkg.sha512"
3409
+    },
3410
+    "System.Data.SQLite.Core/1.0.113.1": {
3411
+      "type": "package",
3412
+      "serviceable": true,
3413
+      "sha512": "sha512-ymvB558/Tgdxj2MzJjhDvPLJ/S2WgG1KzQ1cmqzsW3+YQ5DO+eAU04OpY5deK6fndM+DEU8+lwmmYHxxUS2Qvw==",
3414
+      "path": "system.data.sqlite.core/1.0.113.1",
3415
+      "hashPath": "system.data.sqlite.core.1.0.113.1.nupkg.sha512"
3416
+    },
3417
+    "System.Drawing.Common/4.7.0": {
3418
+      "type": "package",
3419
+      "serviceable": true,
3420
+      "sha512": "sha512-v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==",
3421
+      "path": "system.drawing.common/4.7.0",
3422
+      "hashPath": "system.drawing.common.4.7.0.nupkg.sha512"
3423
+    },
3283
     "System.ValueTuple/4.5.0": {
3424
     "System.ValueTuple/4.5.0": {
3284
       "type": "package",
3425
       "type": "package",
3285
       "serviceable": true,
3426
       "serviceable": true,
4463
       "path": "microsoft.netcore.dotnethostresolver/2.2.0",
4604
       "path": "microsoft.netcore.dotnethostresolver/2.2.0",
4464
       "hashPath": "microsoft.netcore.dotnethostresolver.2.2.0.nupkg.sha512"
4605
       "hashPath": "microsoft.netcore.dotnethostresolver.2.2.0.nupkg.sha512"
4465
     },
4606
     },
4466
-    "Microsoft.NETCore.Platforms/2.2.0": {
4467
-      "type": "package",
4468
-      "serviceable": true,
4469
-      "sha512": "sha512-39+GVHdbm+cmoOjdvm+fhiMbddnuVyUlBdYS8Yhn5xsNaBoTXpgBsxQQlI2Sv9EjIP0F+itG6yrDaOM2OEGupQ==",
4470
-      "path": "microsoft.netcore.platforms/2.2.0",
4471
-      "hashPath": "microsoft.netcore.platforms.2.2.0.nupkg.sha512"
4472
-    },
4473
     "Microsoft.NETCore.Targets/2.0.0": {
4607
     "Microsoft.NETCore.Targets/2.0.0": {
4474
       "type": "package",
4608
       "type": "package",
4475
       "serviceable": true,
4609
       "serviceable": true,

Binārs
ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.dll Parādīt failu


Binārs
ProRestaurant/bin/Debug/netcoreapp2.2/ProRestaurant.pdb Parādīt failu


+ 4
- 1
ProRestaurant/bin/Debug/netcoreapp2.2/appsettings.json Parādīt failu

1
-{
1
+{
2
+  "AppSettings": {
3
+    "Secret": "≡∆≤≥√∞ProVision!"
4
+  },
2
   "Logging": {
5
   "Logging": {
3
     "LogLevel": {
6
     "LogLevel": {
4
       "Default": "Warning"
7
       "Default": "Warning"

Binārs
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.assets.cache Parādīt failu


+ 1
- 1
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csproj.CoreCompileInputs.cache Parādīt failu

1
-77194c0e6065fe8ba524baf1a69af7e606ad6513
1
+d43a7af6b2b5d7d9d5ce44deb53c19ad484cc2cc

+ 1
- 1
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csproj.FileListAbsolute.txt Parādīt failu

27
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.csprojAssemblyReference.cache
27
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.csprojAssemblyReference.cache
28
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.AssemblyInfoInputs.cache
28
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.AssemblyInfoInputs.cache
29
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.AssemblyInfo.cs
29
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.AssemblyInfo.cs
30
-C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.csproj.CoreCompileInputs.cache
31
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.RazorAssemblyInfo.cache
30
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.RazorAssemblyInfo.cache
32
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.RazorAssemblyInfo.cs
31
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.RazorAssemblyInfo.cs
33
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.RazorTargetAssemblyInfo.cache
32
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.RazorTargetAssemblyInfo.cache
34
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.dll
33
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.dll
35
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.pdb
34
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.pdb
36
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.genruntimeconfig.cache
35
 C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.genruntimeconfig.cache
36
+C:\Work\Development\ProRestaurant\RestaurantSite_API\ProRestaurant\obj\Debug\netcoreapp2.2\ProRestaurant.csproj.CoreCompileInputs.cache

Binārs
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.csprojAssemblyReference.cache Parādīt failu


Binārs
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.dll Parādīt failu


Binārs
ProRestaurant/obj/Debug/netcoreapp2.2/ProRestaurant.pdb Parādīt failu


+ 8
- 0
ProRestaurant/obj/ProRestaurant.csproj.nuget.dgspec.json Parādīt failu

71
             "Npgsql.EntityFrameworkCore.PostgreSQL": {
71
             "Npgsql.EntityFrameworkCore.PostgreSQL": {
72
               "target": "Package",
72
               "target": "Package",
73
               "version": "[2.2.0, )"
73
               "version": "[2.2.0, )"
74
+            },
75
+            "System.Data.SQLite": {
76
+              "target": "Package",
77
+              "version": "[1.0.113.1, )"
78
+            },
79
+            "System.Drawing.Common": {
80
+              "target": "Package",
81
+              "version": "[4.7.0, )"
74
             }
82
             }
75
           },
83
           },
76
           "imports": [
84
           "imports": [

+ 240
- 6
ProRestaurant/obj/project.assets.json Parādīt failu

2668
           "Microsoft.NETCore.DotNetAppHost": "2.2.0"
2668
           "Microsoft.NETCore.DotNetAppHost": "2.2.0"
2669
         }
2669
         }
2670
       },
2670
       },
2671
-      "Microsoft.NETCore.Platforms/2.2.0": {
2671
+      "Microsoft.NETCore.Platforms/3.1.0": {
2672
         "type": "package",
2672
         "type": "package",
2673
         "compile": {
2673
         "compile": {
2674
           "lib/netstandard1.0/_._": {}
2674
           "lib/netstandard1.0/_._": {}
2709
           }
2709
           }
2710
         }
2710
         }
2711
       },
2711
       },
2712
+      "Microsoft.Win32.SystemEvents/4.7.0": {
2713
+        "type": "package",
2714
+        "dependencies": {
2715
+          "Microsoft.NETCore.Platforms": "3.1.0"
2716
+        },
2717
+        "compile": {
2718
+          "ref/netstandard2.0/_._": {}
2719
+        },
2720
+        "runtime": {
2721
+          "lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll": {}
2722
+        },
2723
+        "runtimeTargets": {
2724
+          "runtimes/win/lib/netcoreapp2.0/Microsoft.Win32.SystemEvents.dll": {
2725
+            "assetType": "runtime",
2726
+            "rid": "win"
2727
+          }
2728
+        }
2729
+      },
2712
       "NETStandard.Library/2.0.3": {
2730
       "NETStandard.Library/2.0.3": {
2713
         "type": "package",
2731
         "type": "package",
2714
         "dependencies": {
2732
         "dependencies": {
3147
           }
3165
           }
3148
         }
3166
         }
3149
       },
3167
       },
3168
+      "System.Data.SQLite/1.0.113.1": {
3169
+        "type": "package",
3170
+        "dependencies": {
3171
+          "System.Data.SQLite.Core": "1.0.113.1"
3172
+        }
3173
+      },
3174
+      "System.Data.SQLite.Core/1.0.113.1": {
3175
+        "type": "package",
3176
+        "compile": {
3177
+          "lib/netstandard2.0/System.Data.SQLite.dll": {}
3178
+        },
3179
+        "runtime": {
3180
+          "lib/netstandard2.0/System.Data.SQLite.dll": {}
3181
+        },
3182
+        "runtimeTargets": {
3183
+          "runtimes/linux-x64/native/netstandard2.0/SQLite.Interop.dll": {
3184
+            "assetType": "native",
3185
+            "rid": "linux-x64"
3186
+          },
3187
+          "runtimes/linux-x64/native/netstandard2.1/SQLite.Interop.dll": {
3188
+            "assetType": "native",
3189
+            "rid": "linux-x64"
3190
+          },
3191
+          "runtimes/osx-x64/native/netstandard2.0/SQLite.Interop.dll": {
3192
+            "assetType": "native",
3193
+            "rid": "osx-x64"
3194
+          },
3195
+          "runtimes/osx-x64/native/netstandard2.1/SQLite.Interop.dll": {
3196
+            "assetType": "native",
3197
+            "rid": "osx-x64"
3198
+          },
3199
+          "runtimes/win-x64/native/netstandard2.0/SQLite.Interop.dll": {
3200
+            "assetType": "native",
3201
+            "rid": "win-x64"
3202
+          },
3203
+          "runtimes/win-x64/native/netstandard2.1/SQLite.Interop.dll": {
3204
+            "assetType": "native",
3205
+            "rid": "win-x64"
3206
+          },
3207
+          "runtimes/win-x86/native/netstandard2.0/SQLite.Interop.dll": {
3208
+            "assetType": "native",
3209
+            "rid": "win-x86"
3210
+          },
3211
+          "runtimes/win-x86/native/netstandard2.1/SQLite.Interop.dll": {
3212
+            "assetType": "native",
3213
+            "rid": "win-x86"
3214
+          }
3215
+        }
3216
+      },
3150
       "System.Diagnostics.Contracts/4.3.0": {
3217
       "System.Diagnostics.Contracts/4.3.0": {
3151
         "type": "package",
3218
         "type": "package",
3152
         "dependencies": {
3219
         "dependencies": {
3243
           "ref/netstandard1.5/System.Diagnostics.Tracing.dll": {}
3310
           "ref/netstandard1.5/System.Diagnostics.Tracing.dll": {}
3244
         }
3311
         }
3245
       },
3312
       },
3313
+      "System.Drawing.Common/4.7.0": {
3314
+        "type": "package",
3315
+        "dependencies": {
3316
+          "Microsoft.NETCore.Platforms": "3.1.0",
3317
+          "Microsoft.Win32.SystemEvents": "4.7.0"
3318
+        },
3319
+        "compile": {
3320
+          "ref/netstandard2.0/System.Drawing.Common.dll": {}
3321
+        },
3322
+        "runtime": {
3323
+          "lib/netstandard2.0/System.Drawing.Common.dll": {}
3324
+        },
3325
+        "runtimeTargets": {
3326
+          "runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll": {
3327
+            "assetType": "runtime",
3328
+            "rid": "unix"
3329
+          },
3330
+          "runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll": {
3331
+            "assetType": "runtime",
3332
+            "rid": "win"
3333
+          }
3334
+        }
3335
+      },
3246
       "System.Dynamic.Runtime/4.3.0": {
3336
       "System.Dynamic.Runtime/4.3.0": {
3247
         "type": "package",
3337
         "type": "package",
3248
         "dependencies": {
3338
         "dependencies": {
7158
         "runtime.json"
7248
         "runtime.json"
7159
       ]
7249
       ]
7160
     },
7250
     },
7161
-    "Microsoft.NETCore.Platforms/2.2.0": {
7162
-      "sha512": "39+GVHdbm+cmoOjdvm+fhiMbddnuVyUlBdYS8Yhn5xsNaBoTXpgBsxQQlI2Sv9EjIP0F+itG6yrDaOM2OEGupQ==",
7251
+    "Microsoft.NETCore.Platforms/3.1.0": {
7252
+      "sha512": "z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
7163
       "type": "package",
7253
       "type": "package",
7164
-      "path": "microsoft.netcore.platforms/2.2.0",
7254
+      "path": "microsoft.netcore.platforms/3.1.0",
7165
       "files": [
7255
       "files": [
7166
         ".nupkg.metadata",
7256
         ".nupkg.metadata",
7167
         ".signature.p7s",
7257
         ".signature.p7s",
7168
         "LICENSE.TXT",
7258
         "LICENSE.TXT",
7169
         "THIRD-PARTY-NOTICES.TXT",
7259
         "THIRD-PARTY-NOTICES.TXT",
7170
         "lib/netstandard1.0/_._",
7260
         "lib/netstandard1.0/_._",
7171
-        "microsoft.netcore.platforms.2.2.0.nupkg.sha512",
7261
+        "microsoft.netcore.platforms.3.1.0.nupkg.sha512",
7172
         "microsoft.netcore.platforms.nuspec",
7262
         "microsoft.netcore.platforms.nuspec",
7173
         "runtime.json",
7263
         "runtime.json",
7174
         "useSharedDesignerContext.txt",
7264
         "useSharedDesignerContext.txt",
7231
         "version.txt"
7321
         "version.txt"
7232
       ]
7322
       ]
7233
     },
7323
     },
7324
+    "Microsoft.Win32.SystemEvents/4.7.0": {
7325
+      "sha512": "mtVirZr++rq+XCDITMUdnETD59XoeMxSpLRIII7JRI6Yj0LEDiO1pPn0ktlnIj12Ix8bfvQqQDMMIF9wC98oCA==",
7326
+      "type": "package",
7327
+      "path": "microsoft.win32.systemevents/4.7.0",
7328
+      "files": [
7329
+        ".nupkg.metadata",
7330
+        ".signature.p7s",
7331
+        "LICENSE.TXT",
7332
+        "THIRD-PARTY-NOTICES.TXT",
7333
+        "lib/net461/Microsoft.Win32.SystemEvents.dll",
7334
+        "lib/net461/Microsoft.Win32.SystemEvents.xml",
7335
+        "lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll",
7336
+        "lib/netstandard2.0/Microsoft.Win32.SystemEvents.xml",
7337
+        "microsoft.win32.systemevents.4.7.0.nupkg.sha512",
7338
+        "microsoft.win32.systemevents.nuspec",
7339
+        "ref/net461/Microsoft.Win32.SystemEvents.dll",
7340
+        "ref/net461/Microsoft.Win32.SystemEvents.xml",
7341
+        "ref/net472/Microsoft.Win32.SystemEvents.dll",
7342
+        "ref/net472/Microsoft.Win32.SystemEvents.xml",
7343
+        "ref/netstandard2.0/Microsoft.Win32.SystemEvents.dll",
7344
+        "ref/netstandard2.0/Microsoft.Win32.SystemEvents.xml",
7345
+        "runtimes/win/lib/netcoreapp2.0/Microsoft.Win32.SystemEvents.dll",
7346
+        "runtimes/win/lib/netcoreapp2.0/Microsoft.Win32.SystemEvents.xml",
7347
+        "runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll",
7348
+        "runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.xml",
7349
+        "useSharedDesignerContext.txt",
7350
+        "version.txt"
7351
+      ]
7352
+    },
7234
     "NETStandard.Library/2.0.3": {
7353
     "NETStandard.Library/2.0.3": {
7235
       "sha512": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
7354
       "sha512": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
7236
       "type": "package",
7355
       "type": "package",
8243
         "version.txt"
8362
         "version.txt"
8244
       ]
8363
       ]
8245
     },
8364
     },
8365
+    "System.Data.SQLite/1.0.113.1": {
8366
+      "sha512": "80q28QKsEebMm1PhCBEKFoxTYiE6P1YtA+5IVlBeBxgB8LwDgbaAml6RIfGu719JoRtbmNqtLdhDA8jj84s0gA==",
8367
+      "type": "package",
8368
+      "path": "system.data.sqlite/1.0.113.1",
8369
+      "files": [
8370
+        ".nupkg.metadata",
8371
+        ".signature.p7s",
8372
+        "system.data.sqlite.1.0.113.1.nupkg.sha512",
8373
+        "system.data.sqlite.nuspec"
8374
+      ]
8375
+    },
8376
+    "System.Data.SQLite.Core/1.0.113.1": {
8377
+      "sha512": "ymvB558/Tgdxj2MzJjhDvPLJ/S2WgG1KzQ1cmqzsW3+YQ5DO+eAU04OpY5deK6fndM+DEU8+lwmmYHxxUS2Qvw==",
8378
+      "type": "package",
8379
+      "path": "system.data.sqlite.core/1.0.113.1",
8380
+      "files": [
8381
+        ".nupkg.metadata",
8382
+        ".signature.p7s",
8383
+        "build/net20/System.Data.SQLite.Core.targets",
8384
+        "build/net20/x64/SQLite.Interop.dll",
8385
+        "build/net20/x86/SQLite.Interop.dll",
8386
+        "build/net40/System.Data.SQLite.Core.targets",
8387
+        "build/net40/x64/SQLite.Interop.dll",
8388
+        "build/net40/x86/SQLite.Interop.dll",
8389
+        "build/net45/System.Data.SQLite.Core.targets",
8390
+        "build/net45/x64/SQLite.Interop.dll",
8391
+        "build/net45/x86/SQLite.Interop.dll",
8392
+        "build/net451/System.Data.SQLite.Core.targets",
8393
+        "build/net451/x64/SQLite.Interop.dll",
8394
+        "build/net451/x86/SQLite.Interop.dll",
8395
+        "build/net46/System.Data.SQLite.Core.targets",
8396
+        "build/net46/x64/SQLite.Interop.dll",
8397
+        "build/net46/x86/SQLite.Interop.dll",
8398
+        "lib/net20/System.Data.SQLite.dll",
8399
+        "lib/net20/System.Data.SQLite.dll.config",
8400
+        "lib/net20/System.Data.SQLite.xml",
8401
+        "lib/net40/System.Data.SQLite.dll",
8402
+        "lib/net40/System.Data.SQLite.dll.config",
8403
+        "lib/net40/System.Data.SQLite.xml",
8404
+        "lib/net45/System.Data.SQLite.dll",
8405
+        "lib/net45/System.Data.SQLite.dll.config",
8406
+        "lib/net45/System.Data.SQLite.xml",
8407
+        "lib/net451/System.Data.SQLite.dll",
8408
+        "lib/net451/System.Data.SQLite.dll.config",
8409
+        "lib/net451/System.Data.SQLite.xml",
8410
+        "lib/net46/System.Data.SQLite.dll",
8411
+        "lib/net46/System.Data.SQLite.dll.config",
8412
+        "lib/net46/System.Data.SQLite.xml",
8413
+        "lib/netstandard2.0/System.Data.SQLite.dll",
8414
+        "lib/netstandard2.0/System.Data.SQLite.dll.config",
8415
+        "lib/netstandard2.0/System.Data.SQLite.xml",
8416
+        "lib/netstandard2.1/System.Data.SQLite.dll",
8417
+        "lib/netstandard2.1/System.Data.SQLite.dll.config",
8418
+        "lib/netstandard2.1/System.Data.SQLite.xml",
8419
+        "runtimes/linux-x64/native/netstandard2.0/SQLite.Interop.dll",
8420
+        "runtimes/linux-x64/native/netstandard2.1/SQLite.Interop.dll",
8421
+        "runtimes/osx-x64/native/netstandard2.0/SQLite.Interop.dll",
8422
+        "runtimes/osx-x64/native/netstandard2.1/SQLite.Interop.dll",
8423
+        "runtimes/win-x64/native/netstandard2.0/SQLite.Interop.dll",
8424
+        "runtimes/win-x64/native/netstandard2.1/SQLite.Interop.dll",
8425
+        "runtimes/win-x86/native/netstandard2.0/SQLite.Interop.dll",
8426
+        "runtimes/win-x86/native/netstandard2.1/SQLite.Interop.dll",
8427
+        "system.data.sqlite.core.1.0.113.1.nupkg.sha512",
8428
+        "system.data.sqlite.core.nuspec"
8429
+      ]
8430
+    },
8246
     "System.Diagnostics.Contracts/4.3.0": {
8431
     "System.Diagnostics.Contracts/4.3.0": {
8247
       "sha512": "clL6acqvIbbx3JYunlkrWV5sP9qGd0sLl612eXrBVVwakTTlMNtvZB5RiC2rU2uYxSnIt2ssUQgA2adrYSqYhA==",
8432
       "sha512": "clL6acqvIbbx3JYunlkrWV5sP9qGd0sLl612eXrBVVwakTTlMNtvZB5RiC2rU2uYxSnIt2ssUQgA2adrYSqYhA==",
8248
       "type": "package",
8433
       "type": "package",
8621
         "system.diagnostics.tracing.nuspec"
8806
         "system.diagnostics.tracing.nuspec"
8622
       ]
8807
       ]
8623
     },
8808
     },
8809
+    "System.Drawing.Common/4.7.0": {
8810
+      "sha512": "v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==",
8811
+      "type": "package",
8812
+      "path": "system.drawing.common/4.7.0",
8813
+      "files": [
8814
+        ".nupkg.metadata",
8815
+        ".signature.p7s",
8816
+        "LICENSE.TXT",
8817
+        "THIRD-PARTY-NOTICES.TXT",
8818
+        "lib/MonoAndroid10/_._",
8819
+        "lib/MonoTouch10/_._",
8820
+        "lib/net461/System.Drawing.Common.dll",
8821
+        "lib/netstandard2.0/System.Drawing.Common.dll",
8822
+        "lib/xamarinios10/_._",
8823
+        "lib/xamarinmac20/_._",
8824
+        "lib/xamarintvos10/_._",
8825
+        "lib/xamarinwatchos10/_._",
8826
+        "ref/MonoAndroid10/_._",
8827
+        "ref/MonoTouch10/_._",
8828
+        "ref/net461/System.Drawing.Common.dll",
8829
+        "ref/netcoreapp3.0/System.Drawing.Common.dll",
8830
+        "ref/netcoreapp3.0/System.Drawing.Common.xml",
8831
+        "ref/netstandard2.0/System.Drawing.Common.dll",
8832
+        "ref/xamarinios10/_._",
8833
+        "ref/xamarinmac20/_._",
8834
+        "ref/xamarintvos10/_._",
8835
+        "ref/xamarinwatchos10/_._",
8836
+        "runtimes/unix/lib/netcoreapp2.0/System.Drawing.Common.dll",
8837
+        "runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.dll",
8838
+        "runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.xml",
8839
+        "runtimes/win/lib/netcoreapp2.0/System.Drawing.Common.dll",
8840
+        "runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.dll",
8841
+        "runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.xml",
8842
+        "system.drawing.common.4.7.0.nupkg.sha512",
8843
+        "system.drawing.common.nuspec",
8844
+        "useSharedDesignerContext.txt",
8845
+        "version.txt"
8846
+      ]
8847
+    },
8624
     "System.Dynamic.Runtime/4.3.0": {
8848
     "System.Dynamic.Runtime/4.3.0": {
8625
       "sha512": "SNVi1E/vfWUAs/WYKhE9+qlS6KqK0YVhnlT0HQtr8pMIA8YX3lwy3uPMownDwdYISBdmAF/2holEIldVp85Wag==",
8849
       "sha512": "SNVi1E/vfWUAs/WYKhE9+qlS6KqK0YVhnlT0HQtr8pMIA8YX3lwy3uPMownDwdYISBdmAF/2holEIldVp85Wag==",
8626
       "type": "package",
8850
       "type": "package",
12164
       "Microsoft.EntityFrameworkCore >= 2.2.0",
12388
       "Microsoft.EntityFrameworkCore >= 2.2.0",
12165
       "Microsoft.EntityFrameworkCore.SqlServer >= 2.2.0",
12389
       "Microsoft.EntityFrameworkCore.SqlServer >= 2.2.0",
12166
       "Microsoft.NETCore.App >= 2.2.0",
12390
       "Microsoft.NETCore.App >= 2.2.0",
12167
-      "Npgsql.EntityFrameworkCore.PostgreSQL >= 2.2.0"
12391
+      "Npgsql.EntityFrameworkCore.PostgreSQL >= 2.2.0",
12392
+      "System.Data.SQLite >= 1.0.113.1",
12393
+      "System.Drawing.Common >= 4.7.0"
12168
     ]
12394
     ]
12169
   },
12395
   },
12170
   "packageFolders": {
12396
   "packageFolders": {
12238
           "Npgsql.EntityFrameworkCore.PostgreSQL": {
12464
           "Npgsql.EntityFrameworkCore.PostgreSQL": {
12239
             "target": "Package",
12465
             "target": "Package",
12240
             "version": "[2.2.0, )"
12466
             "version": "[2.2.0, )"
12467
+          },
12468
+          "System.Data.SQLite": {
12469
+            "target": "Package",
12470
+            "version": "[1.0.113.1, )"
12471
+          },
12472
+          "System.Drawing.Common": {
12473
+            "target": "Package",
12474
+            "version": "[4.7.0, )"
12241
           }
12475
           }
12242
         },
12476
         },
12243
         "imports": [
12477
         "imports": [

+ 6
- 2
ProRestaurant/obj/project.nuget.cache Parādīt failu

1
 {
1
 {
2
   "version": 2,
2
   "version": 2,
3
-  "dgSpecHash": "UKkCi2QfTZjSh7Mo0X5a3rAzjsBDnMmv390wbgjtgsJjh822kapoCSoPoj2ogBN40mGlTEqkNrv/q6FLyQUZhw==",
3
+  "dgSpecHash": "0J0rJ7jz4g1WAA6fvo+sC4zFuEM3V67QHc0Kx7Nyy0ep9xx2FB8NdqxEERsAlbcOf71VJmnIpE5N39cE2x52ZA==",
4
   "success": true,
4
   "success": true,
5
   "projectFilePath": "C:\\Work\\Development\\ProRestaurant\\RestaurantSite_API\\ProRestaurant\\ProRestaurant.csproj",
5
   "projectFilePath": "C:\\Work\\Development\\ProRestaurant\\RestaurantSite_API\\ProRestaurant\\ProRestaurant.csproj",
6
   "expectedPackageFiles": [
6
   "expectedPackageFiles": [
172
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.dotnetapphost\\2.2.0\\microsoft.netcore.dotnetapphost.2.2.0.nupkg.sha512",
172
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.dotnetapphost\\2.2.0\\microsoft.netcore.dotnetapphost.2.2.0.nupkg.sha512",
173
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.dotnethostpolicy\\2.2.0\\microsoft.netcore.dotnethostpolicy.2.2.0.nupkg.sha512",
173
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.dotnethostpolicy\\2.2.0\\microsoft.netcore.dotnethostpolicy.2.2.0.nupkg.sha512",
174
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.dotnethostresolver\\2.2.0\\microsoft.netcore.dotnethostresolver.2.2.0.nupkg.sha512",
174
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.dotnethostresolver\\2.2.0\\microsoft.netcore.dotnethostresolver.2.2.0.nupkg.sha512",
175
-    "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.platforms\\2.2.0\\microsoft.netcore.platforms.2.2.0.nupkg.sha512",
175
+    "C:\\Users\\georg\\.nuget\\packages\\microsoft.netcore.platforms\\3.1.0\\microsoft.netcore.platforms.3.1.0.nupkg.sha512",
176
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.targets\\2.0.0\\microsoft.netcore.targets.2.0.0.nupkg.sha512",
176
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.targets\\2.0.0\\microsoft.netcore.targets.2.0.0.nupkg.sha512",
177
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.win32.registry\\4.5.0\\microsoft.win32.registry.4.5.0.nupkg.sha512",
177
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.win32.registry\\4.5.0\\microsoft.win32.registry.4.5.0.nupkg.sha512",
178
+    "C:\\Users\\georg\\.nuget\\packages\\microsoft.win32.systemevents\\4.7.0\\microsoft.win32.systemevents.4.7.0.nupkg.sha512",
178
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\netstandard.library\\2.0.3\\netstandard.library.2.0.3.nupkg.sha512",
179
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\netstandard.library\\2.0.3\\netstandard.library.2.0.3.nupkg.sha512",
179
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\newtonsoft.json\\11.0.2\\newtonsoft.json.11.0.2.nupkg.sha512",
180
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\newtonsoft.json\\11.0.2\\newtonsoft.json.11.0.2.nupkg.sha512",
180
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\newtonsoft.json.bson\\1.0.1\\newtonsoft.json.bson.1.0.1.nupkg.sha512",
181
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\newtonsoft.json.bson\\1.0.1\\newtonsoft.json.bson.1.0.1.nupkg.sha512",
211
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.componentmodel.annotations\\4.5.0\\system.componentmodel.annotations.4.5.0.nupkg.sha512",
212
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.componentmodel.annotations\\4.5.0\\system.componentmodel.annotations.4.5.0.nupkg.sha512",
212
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.console\\4.3.0\\system.console.4.3.0.nupkg.sha512",
213
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.console\\4.3.0\\system.console.4.3.0.nupkg.sha512",
213
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.data.sqlclient\\4.6.0\\system.data.sqlclient.4.6.0.nupkg.sha512",
214
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.data.sqlclient\\4.6.0\\system.data.sqlclient.4.6.0.nupkg.sha512",
215
+    "C:\\Users\\georg\\.nuget\\packages\\system.data.sqlite\\1.0.113.1\\system.data.sqlite.1.0.113.1.nupkg.sha512",
216
+    "C:\\Users\\georg\\.nuget\\packages\\system.data.sqlite.core\\1.0.113.1\\system.data.sqlite.core.1.0.113.1.nupkg.sha512",
214
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.contracts\\4.3.0\\system.diagnostics.contracts.4.3.0.nupkg.sha512",
217
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.contracts\\4.3.0\\system.diagnostics.contracts.4.3.0.nupkg.sha512",
215
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512",
218
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512",
216
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.diagnosticsource\\4.5.0\\system.diagnostics.diagnosticsource.4.5.0.nupkg.sha512",
219
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.diagnosticsource\\4.5.0\\system.diagnostics.diagnosticsource.4.5.0.nupkg.sha512",
218
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.stacktrace\\4.3.0\\system.diagnostics.stacktrace.4.3.0.nupkg.sha512",
221
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.stacktrace\\4.3.0\\system.diagnostics.stacktrace.4.3.0.nupkg.sha512",
219
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.tools\\4.3.0\\system.diagnostics.tools.4.3.0.nupkg.sha512",
222
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.tools\\4.3.0\\system.diagnostics.tools.4.3.0.nupkg.sha512",
220
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.tracing\\4.3.0\\system.diagnostics.tracing.4.3.0.nupkg.sha512",
223
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.tracing\\4.3.0\\system.diagnostics.tracing.4.3.0.nupkg.sha512",
224
+    "C:\\Users\\georg\\.nuget\\packages\\system.drawing.common\\4.7.0\\system.drawing.common.4.7.0.nupkg.sha512",
221
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.dynamic.runtime\\4.3.0\\system.dynamic.runtime.4.3.0.nupkg.sha512",
225
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.dynamic.runtime\\4.3.0\\system.dynamic.runtime.4.3.0.nupkg.sha512",
222
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512",
226
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512",
223
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization.calendars\\4.3.0\\system.globalization.calendars.4.3.0.nupkg.sha512",
227
     "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization.calendars\\4.3.0\\system.globalization.calendars.4.3.0.nupkg.sha512",

Notiek ielāde…
Atcelt
Saglabāt