Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

An Automaty based generator for Entity Framework Core repositories. Creates strongly typed repositories based on the IModel of your context.

License

Notifications You must be signed in to change notification settings

Dresel/Automaty.Generators.EFCoreRepositories

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automaty.Generators.EFCoreRepositories

Build status

Automaty.Generators.EFCoreRepositories is an Automaty based generator for Entity Framework Core repositories. Creates strongly typed repositories based on the IModel of your context.

See the aggregated MusicRepository to get a clue what can be generated.

Work in progress. Criticism, comments and or suggestions are welcome.

Getting started

For more info see the sample project.

Edit your project file and add Automaty.Generators.EFCoreRepositories and the DotNetCli tool as references to your project:

<ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.2" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SQLite" Version="1.1.2" />
    <PackageReference Include="Automaty.Generators.EFCoreRepositories" Version="1.0.0-alpha1" />
    <DotNetCliToolReference Include="Automaty.DotNetCli" Version="1.0.0-alpha6" />
</ItemGroup>

Create the Automaty host and inherit from Host (don't forget to add referenced files):

namespace MyProject
{
    // Automaty IncludeFiles MyContext.cs; IUnitOfWork.cs
    // Automaty IncludeDirectory ./Entities
    public class RepositoriesHost : Host<MyContext>
    {
    }
}

Run Automaty via command line:

dotnet automaty run Repositories.cs --project MyProject.csproj

Automaty.Generators.EFCoreRepositories will then create an in-memory context instance, retrieve the IModel and generate repositories.

About

An Automaty based generator for Entity Framework Core repositories. Creates strongly typed repositories based on the IModel of your context.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages