Skip to content

Commit

Permalink
Commit for v6.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
TanvirArjel committed Nov 9, 2022
1 parent 03c5b87 commit 265a23b
Show file tree
Hide file tree
Showing 80 changed files with 145 additions and 75 deletions.
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/demo/AspNetCoreApp/bin/Debug/net7.0/AspNetCoreApp.dll",
"args": [],
"cwd": "${workspaceFolder}/demo/AspNetCoreApp",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/demo/AspNetCoreApp/AspNetCoreApp.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/demo/AspNetCoreApp/AspNetCoreApp.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/demo/AspNetCoreApp/AspNetCoreApp.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
2 changes: 1 addition & 1 deletion EFCore.GenericRepository.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{98A19DB3-ED3
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "demo", "demo", "{A54E2127-8988-46A4-858A-39A4553504C6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCore5.0", "demo\AspNetCore5.0\AspNetCore5.0.csproj", "{29247626-37E3-43F0-B1D1-ED0CEC02FE69}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCoreApp", "demo\AspNetCoreApp\AspNetCoreApp.csproj", "{29247626-37E3-43F0-B1D1-ED0CEC02FE69}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "demo\UnitTest\UnitTest.csproj", "{375C3AF5-6957-46D1-92F4-869C7E26DE5F}"
EndProject
Expand Down
3 changes: 0 additions & 3 deletions demo/AspNetCore5.0/Views/_ViewImports.cshtml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>AspNetCore5._0</RootNamespace>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.7">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.7">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.7" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.0" />
<PackageReference Include="TanvirArjel.Extensions.Microsoft.DependencyInjection" Version="2.1.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using AspNetCore5._0.Data;
using AspNetCore5._0.Data.Models;
using AspNetCore5._0.Dtos;
using AspNetCoreApp.Data;
using AspNetCoreApp.Data.Models;
using AspNetCoreApp.Dtos;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using TanvirArjel.EFCore.GenericRepository;

namespace AspNetCore5._0.Controllers;
namespace AspNetCoreApp.Controllers;

public class EmployeeController : Controller
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using AspNetCore5._0.Models;
using System.Diagnostics;
using AspNetCoreApp.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

namespace AspNetCore5._0.Controllers;
namespace AspNetCoreApp.Controllers;

public class HomeController : Controller
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using AspNetCore5._0.Data.Models;
using AspNetCoreApp.Data.Models;
using Microsoft.EntityFrameworkCore;

namespace AspNetCore5._0.Data;
namespace AspNetCoreApp.Data;

public class Demo1DbContext : DbContext
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using AspNetCore5._0.Data.Models;
using AspNetCoreApp.Data.Models;
using Microsoft.EntityFrameworkCore;

namespace AspNetCore5._0.Data;
namespace AspNetCoreApp.Data;

public class Demo2DbContext : DbContext
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated />
using AspNetCore5._0.Data;
using AspNetCoreApp.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated />
using AspNetCore5._0.Data;
using AspNetCoreApp.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;

namespace AspNetCore5._0.Data.Models;
namespace AspNetCoreApp.Data.Models;

public class Department
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;

namespace AspNetCore5._0.Data.Models;
namespace AspNetCoreApp.Data.Models;

public class Employee
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AspNetCore5._0.Data.Models;
namespace AspNetCoreApp.Data.Models;

public class EmployeeHistory
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace AspNetCore5._0.Dtos;
namespace AspNetCoreApp.Dtos;

public class EmployeeDto
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace AspNetCore5._0.Models;
namespace AspNetCoreApp.Models;

public class ErrorViewModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

namespace AspNetCore5._0;
namespace AspNetCoreApp;

public class Program
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AspNetCore5._0.Data.Models;
using AspNetCore5._0.Dtos;
using AspNetCoreApp.Data.Models;
using AspNetCoreApp.Dtos;
using Microsoft.EntityFrameworkCore;
using TanvirArjel.EFCore.GenericRepository;
using TanvirArjel.Extensions.Microsoft.DependencyInjection;

namespace AspNetCore5._0.Services;
namespace AspNetCoreApp.Services;

[ScopedService]
public class EmployeeService
Expand Down
12 changes: 6 additions & 6 deletions demo/AspNetCore5.0/Startup.cs → demo/AspNetCoreApp/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using AspNetCore5._0.Data;
using AspNetCore5._0.Data.Models;
using AspNetCore5._0.Services;
using AspNetCoreApp.Data;
using AspNetCoreApp.Data.Models;
using AspNetCoreApp.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
Expand All @@ -10,7 +10,7 @@
using Microsoft.Extensions.Hosting;
using TanvirArjel.EFCore.GenericRepository;

namespace AspNetCore5._0;
namespace AspNetCoreApp;

public class Startup
{
Expand Down Expand Up @@ -55,7 +55,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
bool isExits1 = dbContext1.Set<Department>().Any();
if (isExits1 == false)
{
Department department = new Department()
Department department = new()
{
Name = "Software Development",
};
Expand All @@ -69,7 +69,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
bool isExits2 = dbContext2.Set<Department>().Any();
if (isExits2 == false)
{
Department department = new Department()
Department department = new()
{
Name = "Software Development",
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@model AspNetCore5._0.Data.Models.Employee
@using AspNetCoreApp.Data.Models
@model Employee

@{
ViewData["Title"] = "Create";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@model AspNetCore5._0.Data.Models.Employee
@using AspNetCoreApp.Data.Models;
@model Employee

@{
ViewData["Title"] = "Delete";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@model AspNetCore5._0.Data.Models.Employee
@using AspNetCoreApp.Data.Models;
@model Employee

@{
ViewData["Title"] = "Details";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model AspNetCore5._0.Data.Models.Employee
@model Employee

@{
ViewData["Title"] = "Edit";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model IEnumerable<AspNetCore5._0.Data.Models.Employee>
@model IEnumerable<Employee>

@{
ViewData["Title"] = "Index";
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions demo/AspNetCoreApp/Views/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@using AspNetCoreApp
@using AspNetCoreApp.Models
@using AspNetCoreApp.Data.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions demo/UnitTest/EmployeeServiceTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AspNetCore5._0.Data.Models;
using AspNetCore5._0.Dtos;
using AspNetCore5._0.Services;
using AspNetCoreApp.Data.Models;
using AspNetCoreApp.Dtos;
using AspNetCoreApp.Services;
using Moq;
using System;
using System.Collections.Generic;
Expand Down
12 changes: 6 additions & 6 deletions demo/UnitTest/UnitTest.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Moq" Version="4.18.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AspNetCore5.0\AspNetCore5.0.csproj" />
<ProjectReference Include="..\AspNetCoreApp\AspNetCoreApp.csproj" />
</ItemGroup>
</Project>
Loading

0 comments on commit 265a23b

Please sign in to comment.