visual studio is drunk

This commit is contained in:
Aneliya Konarcheva
2021-03-10 22:32:21 +02:00
parent 781a2873fd
commit a97dd1c2cc
23 changed files with 118 additions and 37 deletions

View File

@@ -4,6 +4,16 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.17.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.12">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Models\Models.csproj" />
</ItemGroup>

View File

@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using LuminousSales.Data;
namespace LuminousSales.Business
namespace Business
{
public class DealsBusiness
{

View File

@@ -1,12 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
using LuminousSales.Data;
namespace LuminousSales.Business
namespace Business
{
public class PermissionsBusiness
{
private PermissionContext permissionContext;
}
}

View File

@@ -1,10 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using Business.Businesses;
using Models.Models;
namespace Business.Businesses
namespace Business
{
public class ProductBusiness
{

View File

@@ -1,9 +0,0 @@
namespace Business.Business
{
internal class ProductContext
{
public ProductContext()
{
}
}
}

View File

@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using LuminousSales.Data;
namespace LuminousSales.Business
namespace Business
{
public class RolesBusiness
{

View File

@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using LuminousSales.Data;
namespace LuminousSales.Business
{

View File

@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using LuminousSales.Data;
namespace LuminousSales.Business
{

View File

@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using LuminousSales.Data;
using Microsoft.ApplicationInsights.Extensibility.Implementation;
namespace LuminousSales.Business
namespace Business
{
public class UsersBusiness
{

View File

@@ -1,12 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
using LuminousSales.Data;
namespace LuminousSales.Business
namespace Business
{
public class UsersToRolesBusiness
{
private UsersToRolesContext usersToRolesContext;
}
}

View File

@@ -2,14 +2,24 @@
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Models.Models;
namespace LuminousSales.Data
{
public class DealContext : DbContext
{
public DealContext()
public DealContext() : base()
{
}
public DbSet<Deal> Deal { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(@"Server= (localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security = true;");
}
}
}
}

View File

@@ -2,14 +2,24 @@
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Models.Models;
namespace LuminousSales.Data
{
public class PermissionContext: DbContext
{
public PermissionContext()
public PermissionContext() : base()
{
}
public DbSet<Permission> Permission { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(@"Server= (localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security = true;");
}
}
}

View File

@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Models.Models;
namespace LuminousSales.Data
{
@@ -7,11 +7,20 @@ namespace LuminousSales.Data
{
public RoleContext():base()
{
}
public DbSet<Role> Role { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(@"Server= (localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security = true;");
}
}
}
}

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Models.Models;
namespace LuminousSales.Data
{
@@ -9,8 +10,18 @@ namespace LuminousSales.Data
{
public RolesToPermissionContext():base()
{
}
public DbSet<Role> RoleToPermission { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(@"Server= (localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security = true;");
}
}
}
}

View File

@@ -2,14 +2,24 @@
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Models.Models;
namespace LuminousSales.Data
{
public class StockContext:DbContext
{
public StockContext()
public StockContext():base()
{
}
public DbSet<Stock> Stock { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(@"Server= (localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security = true;");
}
}
}

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Models.Models;
namespace LuminousSales.Data
{
@@ -11,5 +12,14 @@ namespace LuminousSales.Data
{
}
public DbSet<User> User { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(@"Server= (localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security = true;");
}
}
}

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Models.Models;
namespace LuminousSales.Data
{
@@ -11,5 +12,13 @@ namespace LuminousSales.Data
{
}
public DbSet<Role> Role { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security = true;");
}
}
}

View File

@@ -7,6 +7,16 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.17.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.12">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Business\Business.csproj" />
<ProjectReference Include="..\Models\Models.csproj" />

View File

@@ -16,8 +16,7 @@ namespace Models
public DbSet<Stock> Stock { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(
@"Server=(localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security=True");
optionsBuilder.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=LuminousSales;Integrated Security=True;");
}
}
}

View File

@@ -5,6 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.17.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.12">

View File

@@ -1,6 +1,5 @@
using Models.Models.Interfaces;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Models.Models
{

View File

@@ -1,6 +1,6 @@
using Models.Models.Interfaces;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Models.Models
{

View File

@@ -1,7 +1,7 @@
using Models.Models.Interfaces;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Models.Models