I do that :
var j = new DataSourceModel1Entities();
I got an error there...
public partial class DataSourceModel1Entities : global::System.Data.Objects.ObjectContext
{
///
/// Initialize a new DataSourceModel1Entities object.
///
public DataSourceModel1Entities() :
base(@"name=NetbackmodelConnectionString", "DataSourceModel1Entities") {
this.OnContextCreated();
}
Error : (EmbedInOutputAssembly)
Unable to load the specified metadata resource.
Error :(CopyToOutputDirectory)
System.Data.MetadataException was unhandled
Message="The specified metadata path is not valid. A valid path must be either an existing directory, an existing file with extension '.csdl', '.ssdl', or '.msl', or a URI that identifies an embedded resource."
Source="System.Data.Entity"
StackTrace:
at System.Data.Metadata.Edm.MetadataArtifactLoader.Create(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)
at System.Data.EntityClient.EntityConnection.SplitPaths(String paths)
at System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections)
at System.Data.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection()
at System.Data.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor)
at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
at Netbackmodel.DataSourceModel1Entities..ctor() in C:\Dev\Test\db test\db test\DataSourceModel1.Designer.cs:line 21
at db_test.Program.Main(String[] args) in C:\Dev\Test\db test\db test\Program.cs:line 14
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Any idea?
Error on trying to intance model entities... and boom error
Please refer to the latest post in this thread:
http://www.devart.com/forums/viewtopic.php?p=50708
This should be the case.
http://www.devart.com/forums/viewtopic.php?p=50708
This should be the case.