Problem creating ObjectContext from different project inside solution.

Posted by Levelbit on Stack Overflow See other posts from Stack Overflow or by Levelbit
Published on 2010-03-30T15:09:23Z Indexed on 2010/03/30 15:13 UTC
Read the original article Hit count: 550

Filed under:
|

I have two projects in my Solution. One implements my business logic and has defined entity model of entity framework. When I want to work with classes defined within this project from another project I have some problems in runtime. Actually, the most concerning thing is why I can not instantiate my, so called, TicketEntities(ObjectContext) object from other projects? when I catch following exception: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid. I found out it's brake at: public partial class TicketEntities : global::System.Data.Objects.ObjectContext { public TicketEntities() : base("name=TicketEntities", "TicketEntities") { this.OnContextCreated(); } with exception: Unable to load the specified metadata resource. Just to remind you everthing works fine from orginal project.

© Stack Overflow or respective owner

Related posts about entity

Related posts about entity-framework