The database and model in DB layer

I tried many things but nothing work or I do something wrong

I am a beginner so I need more information what should I do or how can I create project with different layers what I want to do (UI(View+Controller), BLL, DAL, DB (database + DBModel))

Connection string:

    <add name="MvcDBApplicationEntities"
         connectionString="metadata=res://*/DBMvcModel.csdl|res://*/DBMvcModel.ssdl|res://*/DBMvcModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(LocalDB)\v11.0;attachdbfilename=|DataDirectory|\MvcDBApplication.mdf;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;"
         providerName="System.Data.EntityClient" />

This is the full error

An attempt to attach an auto-named database for file c:\users\hazem\documents\visual studio 2013\Projects\MvcApplication\MvcApplication\App_Data\MvcDBApplication.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.


Structure or the project

Related posts

Recent Viewed