Asp.net Pocoorm Base Crud

Lets learn how to start.

  1. First start a new  MVC project with no authentication
  2. Goto Tools->Nuget Manager->package manager console
  3. Then a console will open
  4. Now  write the following code in the console :  install-package petapoco
  5. Now follow the tutorial

http://www.dotnetjalps.com/2013/03/CRUD-operation-PetaPoco-and-ASP-NET-MVC.html

 

=========================================

Create auto model, modify T4 template to generate POCO classes for you:

  1. Open Database.tt file and modify Settings part.
  2. In ConnectionStringName write your database connection string name which located in app.config or web.config.
  3. In Namespace write the namespace for generated Poco classes.
  4. In RepoName write Repository name, this is optional and recommended if you’ll use PetaPoco.
  5. In ClassPerfex write required class name prefix, this is optional.
  6. In ClassSuffix write required class name suffix, this is optional.
  7. Save the file.

http://www.emadmokhtar.com/2014/05/generate-poco-for-database-tables-using-t4-template/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s