tag:blogger.com,1999:blog-22120968.post7492907274136188495..comments2024-03-22T13:47:33.583-04:00Comments on Jon Schneider's Tech Blog: Fix: “The default DbConfiguration instance was used by the Entity Framework before the '...' type was discovered” in LINQPadJon Schneiderhttp://www.blogger.com/profile/05718316809087214442noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-22120968.post-90190920079169203392020-06-02T09:26:37.663-04:002020-06-02T09:26:37.663-04:00i updated my context file to
//------------------...i updated my context file to<br /><br />//------------------------------------------------------------------------------<br />// <br />// This code was generated from a template.<br />//<br />// Manual changes to this file may cause unexpected behavior in your application.<br />// Manual changes to this file will be overwritten if the code is regenerated.<br />// <br />//------------------------------------------------------------------------------<br /><br />namespace MrSales.MrSModels<br />{<br /> using System;<br /> using System.Data.Entity;<br /> using System.Data.Entity.Infrastructure;<br /> using System.Data.Entity.Core.Objects;<br /> using System.Linq;<br /> using System.Data.Common;<br /><br /><br /> public partial class mrsalesdbEntities : DbContext<br /> {<br /> public mrsalesdbEntities()<br /> : base("name=mrsalesdbEntities")<br /> {<br /> }<br /><br /><br /> public mrsalesdbEntities(DbConnection existingConnection, bool contextOwnsConnection)<br /> : base(existingConnection, contextOwnsConnection)<br /> {<br /> }<br /><br /><br /> protected override void OnModelCreating(DbModelBuilder modelBuilder)<br /> {<br /> throw new UnintentionalCodeFirstException();<br /> }<br /> <br /> public virtual DbSet account_items { get; set; }<br /><br /><br />also i updated the app.config file to:<br /><br /><br /><br /><br />but this error appear :<br />The DbConfiguration type 'MrSales.MrSModels.mrsalesdbEntities, MrSales.MrSModels' specified in the application config file could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information.'Bassemhttps://www.blogger.com/profile/02158240631509940379noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-24490626818064617312019-05-08T07:21:26.190-04:002019-05-08T07:21:26.190-04:00Thanks for the good explanation.Thanks for the good explanation.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-35017412192168912002016-05-19T09:30:32.404-04:002016-05-19T09:30:32.404-04:00It works perfectly!! Thanks!It works perfectly!! Thanks!Ramonnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-25892693735367086862016-04-28T20:20:43.635-04:002016-04-28T20:20:43.635-04:00Jonas, in my case, "MyCustomDbConfiguration&q...Jonas, in my case, "MyCustomDbConfiguration" was the name of my class that inherits from DbConfiguration, and "MyProject.MyPackage" is the fully-specified namespace in which that class resides. Sorry it was unclear!Jon Schneiderhttps://www.blogger.com/profile/05718316809087214442noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-55176356902923222652016-04-28T16:05:08.483-04:002016-04-28T16:05:08.483-04:00Jonathan, where can I find what to enter instead o...Jonathan, where can I find what to enter instead of: "MyProject", "MyPackage", and "MyCustomDBConfiguration"?<br />I don't know what to replace it with..Anonymoushttps://www.blogger.com/profile/14924579112686708428noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-56569929928331941122016-03-04T14:24:13.056-05:002016-03-04T14:24:13.056-05:00Exactly my issue. Thanks!Exactly my issue. Thanks!Anonymoushttps://www.blogger.com/profile/15326604501943195989noreply@blogger.com