<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Database on The blog of Mr Wade</title><link>https://www.mrwade.co.uk/tags/database/</link><description>Recent content in Database on The blog of Mr Wade</description><generator>Hugo</generator><language>en-GB</language><copyright>Copyright © 2026, Michael Wade; all rights reserved.</copyright><lastBuildDate>Wed, 29 Feb 2012 11:37:14 +0800</lastBuildDate><atom:link href="https://www.mrwade.co.uk/tags/database/index.xml" rel="self" type="application/rss+xml"/><item><title>Entity Framework 4 - Database Issue</title><link>https://www.mrwade.co.uk/posts/entity-framework-4-database-issue.aspx/</link><pubDate>Wed, 29 Feb 2012 11:17:00 +0800</pubDate><guid>https://www.mrwade.co.uk/posts/entity-framework-4-database-issue.aspx/</guid><description>&lt;p&gt;I have been setting up a little web api with MVC4 and entity framework for a university project, everything was running fine on my local development machine, however when I created the database on my host (123-reg), via scripting the database (From SQL Management Studio) and removing commands 123-reg doesnt accept, my application would try and create the database, which my database account doesnt have permission to do. This was very strange behaviour as the database was in a compatible state, DbContext.Database.CompatableWithModel() returned true, but EF still thought that the database didnt exist, DbContext.Database.Exists() returned false. To fix this I found the following post on Stack Overflow &lt;a href="http://stackoverflow.com/questions/4558377/entity-framework-4-ctp-5-code-first-development"&gt;http://stackoverflow.com/questions/4558377/entity-framework-4-ctp-5-code-first-development&lt;/a&gt; which said that the Database Intialiser needed to be set to null. After applying this change and updating my remote site everything worked as expected.&lt;/p&gt;</description></item></channel></rss>