You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-15Lines changed: 13 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
-
# ASP.Net Core RESTful Service Template
1
+
# ASP.Net REST API Service Template
2
2
3
-
The repository contains a ready to use preconfigured project template for MS Visual Studio 2017and 2019 to create fully functional production-ready cross-platform RESTful services based on ASP.Net Core 3.1/5.0.
3
+
The repository contains a ready to use preconfigured project template for MS Visual Studio 2017, 2019 and 2022 to create fully functional production-ready cross-platform RESTful services based on .Net 5.0/6.0.
4
4
5
-
> Note 1. ASP.NET Core 3.0 has many breaking changes against version 2.2. If you want to use v2.2 or earlier, please, check out one of the previous releases, starting from [version 1.3](https://github.com/drwatson1/AspNet-Core-REST-Service/releases/tag/v1.3) or earlier.
5
+
> NOte 1. The current version does not support .Net Core 3.1. If you want to use it you can use the previous [version 2.6](https://github.com/drwatson1/AspNet-Core-REST-Service/releases/tag/v2.6).
6
+
>
7
+
> Note 2. ASP.NET Core 3.0 has many breaking changes against version 2.2. If you want to use v2.2 or earlier, please, check out one of the previous releases, starting from [version 1.3](https://github.com/drwatson1/AspNet-Core-REST-Service/releases/tag/v1.3) or earlier.
6
8
>
7
-
> Note 2. If you are looking for classic ASP.Net services with WebAPI2 and other stuff like that, please, check out a project [
9
+
> Note 3. If you are looking for classic ASP.Net services with WebAPI2 and other stuff like that, please, check out a project [
8
10
ASP.Net WebApi2 Application with OWIN](https://github.com/drwatson1/AspNet-WebApi).
9
11
10
12
This template is intended to provide you an almost all that you need for creating RESTful services. The project doesn't contain any UI stuff, like React or Angular libraries, npm, Razor views, as well as any problem domain specific things like EnityFramework, some "right" or "neat" project structure or even a number of projects, each for the specific purpose (for example, service itself, domain logic, data access, testing and so on) as it does some other templates. There are too many areas where ASP.Net Core services can be used, so it can hardly be offered anything related to domain areas to fit all of these project types.
@@ -16,7 +18,7 @@ However, some things must be implemented or configured in almost each of the pro
16
18
- AutoMapper
17
19
- Serilog as a default preconfigured logger
18
20
- Unhandled exceptions handling
19
-
-Swashbuckle for API documentation
21
+
-Swagger for API documentation
20
22
- Ability to use environment variables in configuration options and support for '.env' files to easy switching between different environments (thanks to DotNetEnv)
21
23
- ... and some boilerplate code
22
24
@@ -25,12 +27,11 @@ Let me know, what do you think. Any suggestions and bug reports are very appreci
25
27
# Getting Started
26
28
27
29
## Using Visual Studio
28
-
1. Install the extension from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=sergey-tregub.asp-net-core-restful-service-template#overview) or download and install the latest version from [GitHub](https://github.com/drwatson1/AspNet-Core-REST-Service/releases/latest). Also, you can install it from Visual Studio. To do so click on "Tools/Extensions and Updates..." menu item, then select "Online/Visual Studio Marketplace/Templates" on the left pane, search for "ASP.Net Core RESTful Service Template," select it and click "Download" button. Please note! The latest version of the template is targeted to the .Net Core 3.1. If you need a template for the 2.x version use one of the previous versions of the template.
30
+
1. Install the extension from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=sergey-tregub.asp-net-core-restful-service-template#overview) or download and install the latest version from [GitHub](https://github.com/drwatson1/AspNet-Core-REST-Service/releases/latest). Also, you can install it from Visual Studio. To do so click on "Tools/Extensions and Updates..." menu item, then select "Online/Visual Studio Marketplace/Templates" on the left pane, search for "ASP.Net Core RESTful Service Template," select it and click "Download" button. Please note! The latest version of the template is targeted to the .Net 6.0. If you need a template for the 3.1 or 2.x version use one of the previous versions of the template.
29
31
1. Restart Visual Studio
30
32
1. Click on "File/New Project..." menu item
31
-
1. Expand "Installed/Visual C#/.NET Core" on the left pane
32
-
1. Select "APS.Net Core RESTful Service" and click OK button.
33
-
1. Select either "IIS Express" or "ASPNetCore.Sevice1" mode and run a service
33
+
1. Select "APS.Net REST API Service" and click OK button.
34
+
1. Select either "IIS Express" or "RestApi.Sevice1" mode and run a service
34
35
1. Open a browser and navigate to [http://localhost:5000/swagger](http://localhost:5000/swagger) to see an API documentation
35
36
1. Play around with the API. Try to add a new product or update one
36
37
@@ -42,14 +43,14 @@ dotnet new -i DrWatson1.ProjectTemplate.RestAPI
42
43
```
43
44
2. Create a project:
44
45
```
45
-
dotnet new rest-api -n ASPNetCoreService
46
+
dotnet new rest-api -n RestApiService
46
47
```
47
48
It creates a new project "ASPNetCoreService" in the corresponding subfolder.
48
49
Replace the "ASPNetCoreService" with a desired name.
49
50
50
51
3. Run the project:
51
52
```
52
-
cd ASPNetCoreService
53
+
cd RestApiService
53
54
dotnet run
54
55
```
55
56
4. Open a browser and navigate to [http://localhost:5000/swagger](http://localhost:5000/swagger) to see an API documentation
If you want to use .Net 5.0 instead of .Net Core 3.1 open a `.csproj` file and change a value of a `<TargetFramework>` tag from `netcoreapp3.1` to `net5.0`.
65
-
66
63
# Release Notes
67
64
68
65
|Date | Version | Release Notes |
69
66
|-----|---------|---------------|
67
+
|2022-75-23|3.0|<p>- BREAKING CHANGES: Drop support of .Net Core 3.1<p>- The template now uses .Net 6.0 by default<p>- Support of Visual Studio 2022<p>- All packages was updated to the latest versions
70
68
|2021-05-03|2.6|<p>- Support of .Net 5.0<p>- Add `dotnet new` custom template
0 commit comments