Skip to content

Commit 33c575c

Browse files
authored
Update README.md
1 parent b014c8e commit 33c575c

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Primitively [![CI](https://github.com/dtanglr/Primitively/actions/workflows/dotnet.yml/badge.svg?branch=main)](https://github.com/dtanglr/Primitively/actions/workflows/dotnet.yml)
44

5-
**Primitively** is a Rosyln-powered C# source code generator of strongly-typed IDs and DDD-style value objects that encapsulate a single GUID, integer, date or string .NET *primitively* typed value.
5+
**Primitively** is a Rosyln-powered C# source code generator of strongly-typed IDs and DDD-style value objects encapsulating a single GUID, integer, date or string .NET *primitively* typed value.
66

77
For example: -
88

@@ -26,14 +26,14 @@ public partial record struct Sku;
2626
|:--|:--|:--|
2727
| `Primitively` | [![NuGet](https://buildstats.info/nuget/Primitively?includePreReleases=true)](https://www.nuget.org/packages/Primitively/ "Download Primitively from NuGet.org") | The Primitively source generator package. |
2828
| `Primitively.Abstractions` | [![NuGet](https://buildstats.info/nuget/Primitively.Abstractions?includePreReleases=true)](https://www.nuget.org/packages/Primitively.Abstractions/ "Download Primitively.Abstractions from NuGet.org") | Primitively interfaces, metadata, attributes and configuration classes. |
29-
| `Primitively.AspNetCore.Mvc` | [![NuGet](https://buildstats.info/nuget/Primitively.AspNetCore.Mvc?includePreReleases=true)](https://www.nuget.org/packages/Primitively.AspNetCore.Mvc/ "Download Primitively.AspNetCore.Mvc from NuGet.org") | ASP.NET MVC model binding support for Primitively types used in route and querystring parameters. |
30-
| `Primitively.AspNetCore.SwaggerGen` | [![NuGet](https://buildstats.info/nuget/Primitively.AspNetCore.SwaggerGen?includePreReleases=true)](https://www.nuget.org/packages/Primitively.AspNetCore.SwaggerGen/ "Download Primitively.AspNetCore.SwaggerGen from NuGet.org") | Swagger Open API schema support for Primitively types using Swashbuckle. |
29+
| `Primitively.AspNetCore.Mvc` | [![NuGet](https://buildstats.info/nuget/Primitively.AspNetCore.Mvc?includePreReleases=true)](https://www.nuget.org/packages/Primitively.AspNetCore.Mvc/ "Download Primitively.AspNetCore.Mvc from NuGet.org") | ASP.NET MVC model binding support for Primitively types used in route and query string parameters. |
30+
| `Primitively.AspNetCore.SwaggerGen` | [![NuGet](https://buildstats.info/nuget/Primitively.AspNetCore.SwaggerGen?includePreReleases=true)](https://www.nuget.org/packages/Primitively.AspNetCore.SwaggerGen/ "Download Primitively.AspNetCore.SwaggerGen from NuGet.org") | Swagger Open API schema support is available for Primitively types using Swashbuckle. |
3131
| `Primitively.FluentValidation` | [![NuGet](https://buildstats.info/nuget/Primitively.FluentValidation?includePreReleases=true)](https://www.nuget.org/packages/Primitively.FluentValidation/ "Download Primitively.FluentValidation from NuGet.org") | FluentValidation support for Primitively types. |
3232
| `Primitively.MongoDB.Bson` | [![NuGet](https://buildstats.info/nuget/Primitively.MongoDB.Bson?includePreReleases=true)](https://www.nuget.org/packages/Primitively.MongoDB.Bson/ "Download Primitively.MongoDB.Bson from NuGet.org") | BSON serialization for Primitively types stored in MongoDB. |
3333

3434
## Documentation
3535

36-
This README is designed get you started generating your own strongly-typed identifiers with just a few lines of code.
36+
This README is designed to help you generate your own strongly typed identifiers with just a few lines of code.
3737

3838
For more detailed information about Primitively, check out [primitively.net][primitively-website].
3939

@@ -47,7 +47,7 @@ dotnet add package Primitively
4747

4848
Open your csproj file and edit the package reference, setting `PrivateAssets="All"`. The file will look something like this afterwards:
4949

50-
```xml
50+
```XML
5151
<Project Sdk="Microsoft.NET.Sdk">
5252

5353
<PropertyGroup>
@@ -63,13 +63,13 @@ Open your csproj file and edit the package reference, setting `PrivateAssets="Al
6363
</Project>
6464
```
6565

66-
You are now ready to create your first Primitively source generated type!
66+
You are now ready to create your first Primitively source-generated type!
6767

6868
Create a new class file and add a reference to Primitively and decorate your `partial record struct` with one of the Primitively attributes such as `[Guid]`.
6969

7070
For example: -
7171

72-
```cs
72+
``` cs
7373
using Primitively;
7474

7575
namespace Acme.Examples;
@@ -126,7 +126,7 @@ dotnet add package Primitively.FluentValidation
126126

127127
### Dependency injection
128128

129-
Here's an example of the DI setup for a C# ASP.NET web api project that references a class library containing Primitively source generated types and is generating **swagger** documentation.
129+
Here's an example of the DI setup for a C# ASP.NET web API project that references a class library containing Primitively source generated types and is generating **swagger** documentation.
130130

131131
```cs
132132
var builder = WebApplication.CreateBuilder(args);
@@ -139,13 +139,13 @@ builder.Services.AddPrimitively(options =>
139139
{
140140
// Register the location of source generated Primitively types within the application
141141
// NB. No need to use reflection to scan assemblies! Each class library that contains source
142-
// generated Primitively types also has a 'PrimitiveLibrary' static helper class. Meta data such
143-
// as type name, underlying data type, example value, min / max Length etc can then be obtained
142+
// generated Primitively types also have a 'PrimitiveLibrary' static helper class. Metadata such
143+
// as a type name, underlying data type, example value, min/max Length etc can then be obtained
144144
// from the PrimitiveRepository instance within each class library
145145
options.Register(Acme.Lib1.PrimitiveLibrary.Repository);
146146
})
147-
// Add AspNetCore Mvc model binding support for Primitively types used in APIs. This means strongly typed
148-
// Primitively types can easily be used as querystring and route params too etc
147+
// Add AspNetCore MVC model binding support for Primitively types used in APIs. This means strongly typed
148+
// Primitively types can easily be used as query string and route params too etc
149149
.AddMvc()
150150
// Add Swashbuckle Open Api Schema Filter so Primitively types are fully supported in the API Swagger documentation
151151
.AddSwaggerGen();
@@ -163,7 +163,7 @@ dotnet add package Primitively.MongoDB.Bson
163163

164164
Here's an example of the DI setup for a .NET core application that uses both MongoDB and Primitively.
165165

166-
```cs
166+
``` cs
167167
var services = new ServiceCollection();
168168

169169
// Add primitively configuration
@@ -179,7 +179,7 @@ services.AddPrimitively(options =>
179179
.AddBson();
180180
```
181181

182-
Your MongoDB related Primitively types can be registered in this way as well: -
182+
Your MongoDB-related Primitively types can be registered in this way as well: -
183183

184184
```cs
185185
services.AddPrimitively()

0 commit comments

Comments
 (0)