Argon.Extensions.EntityFrameworkCore 8.1.0
Argon.Extensions.EntityFrameworkCore
Entity Framework Core extensions designed for Argon .NET services
Installation
dotnet add package Argon.Extensions.EntityFrameworkCore
Generators
Empty constructor generator
The goal of this generator is to create an empty constructor for given entity instead of create a dedicated empty constructor for each entity.
😕 What you'll do without this generator
public class Book
{
public int Id { get; set; }
public string Title { get; set; }
public string Author { get; set; }
#pragma warning disable CS8618
public Book()
{
// Not very developer friendly
}
#pragma warning restore CS8618
}
😃 What you'll do with this generator
You must mark the entity with the [EmptyConstructible] attribute to enable the generator and make it partial.
[EmptyConstructible]
public partial class Book
{
public int Id { get; set; }
public string Title { get; set; }
public string Author { get; set; }
}
It will generate the following code:
public partial class Book
{
public Book()
{
}
}
No packages depend on Argon.Extensions.EntityFrameworkCore.
.NET Standard 2.0
- Microsoft.CodeAnalysis.CSharp (>= 4.13.0)