Entity Framework Core
Normally, Jerrycurl defines its own object model from a collection of simple classes
decorated with attributes such as Table
, Column
, Id
, Key
etc.
However, if you already have a project that uses Entity Framework Core as its data mapper, Jerrycurl allows you to instead use the metadata that is already defined by EF.
To get started, simply install the extension package.
dotnet add package Jerrycurl.Extensions.EntityFrameworkCore
And register the context within your domain.
class MyDomain : IDomain
{
public void Configure(DomainOptions options)
{
options.UseEntityFrameworkCore<MyDbContext>();
}
}
After this, you can use your EF model similar to how you would use a Jerrycurl model.
@result Blog
SELECT @R.Star()
Please note that any EF object used by Jerrycurl by default does not participate in EF's change tracking behavior.