I'm a relatively new asp.net developer now in the process of making transition to become a Sharepoint 2010 Developer. I would like to know is it possible to use Sharepoint 2010 with newly created database which use Entity framework as the ORM mapper. Could anybody please provide me the architecture on how to do that. Thank you in advance.
Congratulations! You are a new ASP.NET developer and already you are making the move to become a Sharepoint 2010 Developer!
It is time to leave behind the world of ORM's and embrace the SharePoint object model. First you will need to decide whether a separate database is the right approach, as opposed to storing information in a SharePoint list, for example. The latter is ultimately stored in a database, but it is one which you will not be touching directly, only through the SharePoint object model. Generally a custom database is recommended if the are complex relations between tables, or there is a very large amount of complex data, or if the database already exists.
If you have decided that you will be using a database you can get to that using custom code as before. You could even use an ORM. But a better solution is to use the Business Connectivity Services in SharePoint. This will allow you to interact with your database and surface it in SharePoint without writing any code. Or you can use the object model or write your own connectors. Here's an introduction.
EF is not usefull here, but exists specially sharepoint ORM's:
For auto generated entity classes you can use Linq To Sharepoint (SPMetal)
For hand written POCO entities you can try using SharepointCommon ORM