public void Throws_on_attempt_to_use_context_with_no_store() { Assert.Equal( CoreStrings.NoProviderConfigured, Assert.Throws <InvalidOperationException>(() => { using (var context = new NoServicesAndNoConfigBlogContext()) { context.Blogs.Add(new Blog { Name = "The Waffle Cart" }); context.SaveChanges(); } }).Message); }
public void Throws_on_attempt_to_use_context_with_no_store() { Assert.Equal( CoreStrings.NoProviderConfigured, Assert.Throws<InvalidOperationException>(() => { using (var context = new NoServicesAndNoConfigBlogContext()) { context.Blogs.Add(new Blog { Name = "The Waffle Cart" }); context.SaveChanges(); } }).Message); }