npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

entity-generator

v1.0.7

Published

Generates C# entity classes from database

Readme

entity-generator

Generator for C# .NET Entity Framework classes from SQL Server Database and (optionally) PowerDesigner PDM file.

It generates classes mapping the table and column names to the class and property names in the PascalCase version. For exemple a table MY_TABLE will generate a class MyClass with the table annotation.

Optionally you can provide a PowerDesigner .pdm file from where the generator will get the name mapping instead of generating the PascalCase version.

Instalation

npm install -g entity-generator

Usage

  1. Go to your project folder on the command line: (this is the folder where your project.csproj file is located)

  2. Run the entity-generator command:

egen
  1. On the first run the command line will ask you some things:

    The connectionString Password=YOUR_PASSWORD;Persist Security Info=True;User ID=YOUR_DB_USER;Initial Catalog=YOUR_DATABASE;Data Source=YOUR_SERVER\YOUR_NAMED_INSTANCE

    The C# namespace for the generated classes

    The folder name for the entity classes

    The PDM file name (The pdm should be moved/copied to the project folder)

    The .csproj file name

    The name of the connectionString on the app.config file

  2. After that the generator will save this this information in a egen-config.json file:

{
    "source": "Password=YOUR_PASSWORD;Persist Security Info=True;User ID=YOUR_DB_USER;Initial Catalog=YOUR_DATABASE;Data Source=YOUR_SERVER\\YOUR_NAMED_INSTANCE",
    "namespace": "YourNamespace",
    "entitiesFolder": "YouEntitiesFolder",
    "pdmFile": "YourPdmFile.pdm",
    "projectFile": "YouProject.csproj",
    "sourceName": "YouConnectionStringName"
}
  1. The classes will then be generated and on subsequent uses the config info will be read directly from the json file.

Notes

This generator does not create the folder for the entities. You have to create the folder manually and then add the folder name to config file.

Node version 8.11.2 or higher is required.

Running this generator will not add Entity Framework to your project. You will have add it your self and then run the generator just to create the classes.

As this generator was made to generate classes for a web api the lazy loading option on the context class is generated as disabled, because when serializing the class to JSON with lazy load there was a outOfMemoryException being thrown.

Suggestions and help are welcome.

Shermam Miranda ([email protected])