Closed curia-damiano closed 6 years ago
Hmm, I'm using Azure SQL and didn't have this problem at all. Just had to change UseSqlLite() to UseSqlServer() on line 34 of Blogifier.Web/Startup.cs.
SQLite and SQL Server should work out of the box, other options may or may not.
Hi, the web application doesn't work with Azure SQL, even with Mars=true. What I had to do, was to modify SettingsController waiting for the writing of each field: _db.CustomFields.SetCustomField(CustomType.Application, 0, Constants.Title, model.Title).Wait(); _db.CustomFields.SetCustomField(CustomType.Application, 0, Constants.Description, model.Description).Wait(); _db.CustomFields.SetCustomField(CustomType.Application, 0, Constants.ProfileLogo, model.Logo).Wait(); _db.CustomFields.SetCustomField(CustomType.Application, 0, Constants.ProfileAvatar, model.Avatar).Wait(); _db.CustomFields.SetCustomField(CustomType.Application, 0, Constants.ProfileImage, model.Image).Wait(); _db.CustomFields.SetCustomField(CustomType.Application, 0, Constants.BlogTheme, model.BlogTheme).Wait(); _db.CustomFields.SetCustomField(CustomType.Application, 0, Constants.SendGridApiKey, model.EmailKey).Wait(); _db.CustomFields.SetCustomField(CustomType.Application, 0, Constants.HeadCode, model.BlogHead).Wait(); _db.CustomFields.SetCustomField(CustomType.Application, 0, Constants.FooterCode, model.BlogFooter).Wait();
Ugly, but it was the smallest change to make it work with SQL Azure.