Recently at work, I was tasked with implementing a URL shortener for my department to use internally. We're largely a ASP.NET MVC shop (whenever possible), so naturally I gravitated towards the open source http://shrinkr.codeplex.com/. However, Entity Framework is foreign to me and I have no idea how to actually get this up and running. I've created a SQL08R2 database for it, and passed it (what should be) a valid connection string:
<add name="Shrinkr" connectionString="Data Source=sql08r2.myFQDN;Initial Catalog=Shrinkr;Integrated Security=True" providerName="System.Data.SqlClient" />
Building and running it in Debug mode yields the following error:
Of course, my database is empty and has no table structure. I just can't figure out how the heck to get the database populated with the correct initial schema. I've heard that EF can autogenerate the database, but I'm not sure if that applies in this case. If there is a SQL file in the Shrinkr release to get the DB up and running, I sure as heck can't find it. I've been banging my head against my desk for a few days now on this and I can't figure out what I'm miss开发者_JAVA百科ing!
I just downloaded the source, and there is a create.sql script in the Database folder. Sounds like that is what you're looking for.
精彩评论