Introducing generator-efrepo for yeoman
In this blog post I will show you how to use the new generator-efrepo that I wrote couple of days ago. The idea behind this Yeoman generator is to automate some of the boaring tasks while starting on a brand new project such as,
- Creating Model classes
- Adding EntitiFramework NuGet package
- Creating EntitiFramework Context class
- Creating Repositories and UnitOfWork on top of your context
- During public demos you have to create multiple class and integrate EF for data access
This blog post assumes that you have basic idea about the Yeoman generator itself along with EntityFramework CodeFirst and Repository/UnitOfWork design patterns. If not,please do some basic reading on here before you start using this generator. Alright, let's get started.
Installing Yeoman(If you do not have it already)
Then make a directory where you want the Yeoman generator to create the EntityFramework project. Navigate to that folder in your command line tool.Make sure you have nodejs and npm installed on your system by runing following commands.
Check nodejs
$ node -v
Check npm
$ npm -v
Install Yeoman
$ npm install -g yo