<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>IDesignTimeDbContextFactory on CodingBlast</title><link>https://codingblast.com/tags/idesigntimedbcontextfactory/</link><description>Recent content in IDesignTimeDbContextFactory on CodingBlast</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 21 Sep 2017 21:07:05 +0000</lastBuildDate><atom:link href="https://codingblast.com/tags/idesigntimedbcontextfactory/index.xml" rel="self" type="application/rss+xml"/><item><title>EntityFramework Core - Add an implementation of IDesignTimeDbContextFactory - Multiple DbContext's</title><link>https://codingblast.com/entityframework-core-add-implementation-idesigntimedbcontextfactory-multiple-dbcontexts/</link><pubDate>Thu, 21 Sep 2017 19:47:57 +0000</pubDate><guid>https://codingblast.com/entityframework-core-add-implementation-idesigntimedbcontextfactory-multiple-dbcontexts/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;We already talked about problem when Entity Framework Core tooling requires you to implement &lt;em&gt;IDesignTimeDbContextFactory&lt;DbContext&gt;&lt;/em&gt; - check out &lt;a href="https://codingblast.com/entityframework-core-idesigntimedbcontextfactory/"&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It gets interesting when you have more than one &lt;em&gt;DbContext&lt;/em&gt; in your application and you want to add another implementation of &lt;em&gt;IDesignTimeDbContextFactory&lt;/em&gt;, without repeating the code and making sure that EF Core tooling picks the right one.&lt;/p&gt;</description></item><item><title>EntityFramework Core - Add an implementation of IDesignTimeDbContextFactory</title><link>https://codingblast.com/entityframework-core-idesigntimedbcontextfactory/</link><pubDate>Mon, 21 Aug 2017 15:09:44 +0000</pubDate><guid>https://codingblast.com/entityframework-core-idesigntimedbcontextfactory/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;Your DbContext in a separate project - class library project. You are trying to add new migration and update database, and you are running into this error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Unable to create an object of type &amp;lsquo;CodingBlastDbContext&amp;rsquo;. Add an implementation of &amp;lsquo;IDesignTimeDbContextFactory&amp;rsquo; to the project, or see &lt;a href="https://go.microsoft.com/fwlink/?linkid=851728"&gt;https://go.microsoft.com/fwlink/?linkid=851728&lt;/a&gt; for additional patterns supported at design time.&lt;/p&gt;</description></item></channel></rss>