Welcome to the Stivan.in EF Core Generator! This tool is designed to dramatically accelerate your .NET development workflow by automating the creation of a robust data layer for your applications.
Product
) and click Add.Name
, Price
).Type
, mark it as IsRequired
, etc..zip
archive with your C# code organized into Models
, Data
, and ViewModels
folders.The application is divided into three main columns: The Models List (left), the Properties/Members List (center), and the main Editor (right).
Correctly defining relationships is the most powerful feature of this tool. This is done by setting the PropertyKind
and InverseNavigationPropertyName
on both sides of the relationship.
Use the Import button to load a .json
schema file, and use the Download button with the "JSON" option selected to save your work.
After you download the .zip
file, follow these steps to integrate it into a new project.
Open your terminal and create a new ASP.NET Core Web API project.
dotnet new webapi -n MyAwesomeApp
cd MyAwesomeApp
Install the required NuGet packages for Entity Framework Core.
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.EntityFrameworkCore.Design
Unzip the downloaded archive and copy the Models
, Data
, and ViewModels
folders into your new project's root directory.
Open Program.cs
and add the necessary lines to register your DbContext
with dependency injection.
// Add these using statements at the top
using Microsoft.EntityFrameworkCore;
using MyAwesomeApp.Data;
builder.Services.AddDbContext<MyAwesomeAppDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
Open appsettings.json
and add your database connection string.
"ConnectionStrings": {
"DefaultConnection": "Server=.;Database=MyAwesomeDb;Trusted_Connection=True;TrustServerCertificate=True;"
}
Run the final commands in your terminal to create the migrations and apply them to your database.
dotnet ef migrations add InitialCreate
dotnet ef database update
Yes, the Stivan.in EF Core Generator is completely free to use.
Yes. The schema data you provide is processed in-memory on our server solely to generate your code. We do not store or log your designs after the generation process is complete.
We welcome all feedback! For inquiries or direct support, please send an email to our support team.