Some thoughts, links and tutorials I used in my quest to build an MVC WEB WEB API With EF Framework
Date: Wednesday, January 30, 2013 10:44 AM
Tutorials:
Here is a nice, clean tutorial on MVC and EF (NOT with WEB API!!!):
http://www.itorian.com/2012/08/code-first-approach-in-entity-framework.html#.UCZ4Op0gd94
MSDN Tutorial on code first (Familiarizes you with Migrations, Data Motion, and custom SQL):
http://msdn.microsoft.com/en-us/data/jj591621.aspx
And here is a database first tutorial (Again, NOT with WEB API!!!):
http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/database-first-approach-in-entity-framework/
**** Actual EF Code First WEB API Tutorial by Jason Zanders (Microsoft all star):
http://blogs.msdn.com/b/jasonz/archive/2012/07/23/my-favorite-features-entity-framework-code-first-and-asp-net-ewb-api.aspx
View and Layout Information/Tutorials:
http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-a-view
Configuring ASP.NET WEB API - routing, global, service, per-controller configuration(Media Types, parameter binding, etc…) Tutorial and info:
http://www.asp.net/web-api/overview/extensibility/configuring-aspnet-web-api
WEB API Dependency Resolver (Dependency Injection) (Volatile Interfaces)
http://www.asp.net/web-api/overview/extensibility/using-the-web-api-dependency-resolver
REST API vs RPC API - overview, best practices, and design articles:
***Josh Reuben - ASPNET WEBAPI REST *** EXCELLENT ARTICLE on best practices considerations:
http://geekswithblogs.net/JoshReuben/archive/2012/10/28/aspnet-webapi-rest-guidance.aspx
http://encosia.com/rest-vs-rpc-in-asp-net-web-api-who-cares-it-does-both/
Web API Testing Links:
http://blog.jonathanchannon.com/2012/11/29/asp-net-web-api-testing/
Routing and Route Constraints for ASPNET and WEBAPI:
http://www.asp.net/mvc/tutorials/controllers-and-routing/creating-a-route-constraint-cs
IoC:
I abandoned NINJECT IoC Containers for dependency injection after experiencing numerous problems. I decided to go with Microsoft Unity as outlined here:
http://www.asp.net/web-api/overview/extensibility/using-the-web-api-dependency-resolver
Instead of using the ASP.NET Unity Web API package, I used the new Unity MVC4 package via NuGet. This worked extremely well and was much less cumbersome to implement.
ID Server:
Thinktecture ID Server: I'm still playing with this, but hav not yet put anything up into a production setting. A good video outlining the basic steps in setting everything up:
http://vimeo.com/51088126
Other Notes:
StackOverflow comment regarding MVC-WEB API and EF
http://stackoverflow.com/questions/13408659/build-asp-net-application-with-web-api-and-database-first-strategy
Get the EF Power Tools from Microsoft (Very Useful!)
http://blogs.msdn.com/b/adonet/archive/2012/04/09/ef-power-tools-beta-2-available.aspx
If you run into connection and/or connectstring issues:
http://stackoverflow.com/questions/3218208/entity-framework-v4-code-only-connection-string
http://stackoverflow.com/questions/689355/metadataexception-unable-to-load-the-specified-metadata-resource
No comments:
Post a Comment