Last active
August 29, 2015 14:01
-
-
Save julielerman/ff55cd76b8af1cea5eb2 to your computer and use it in GitHub Desktop.
trouble ...starts with a t and that rhymes with p
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//debugging I can see this db getting created in file explorer | |
//the savechanges throws every time (from a test or from app) with SQLite exception "SQL logic error or missing database" | |
using (var contextCreateDb = new BreweryContext()) | |
{ | |
//database exists seems to be working with current ef7 build but not delete yet | |
//if (contextCreateDb.Database.Exists()) { | |
// contextCreateDb.Database.Delete(); //but delete doesnt work yet ;) | |
// } | |
await contextCreateDb.Database.CreateAsync(); | |
} | |
using (var context = new BreweryContext()) { | |
context.Breweries.Add(Brewery.Create("a", "awesomesauce", "awesomesauce.com","x", "saucey")); | |
try { | |
await context.SaveChangesAsync(); | |
} | |
catch (Exception ex) { | |
throw ex; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment