i
BTW I think solution pre-generating views will significantly improve performance of Entity Framwork. You can find more info here and here.
"However, the downside of this solution is the need to keep the generated views synchronized with changes to the model" - that's why we'll not follow this solution into official releases
BTW I think solution pre-generating views will significantly improve performance of Entity Framwork. You can find more info here and here.
"However, the downside of this solution is the need to keep the generated views synchronized with changes to the model" - that's why we'll not follow this solution into official releases
Just tried to do this, but nop breaks after doing so. Error:
Server Error in '/' Application.
Unable to load the specified metadata resource.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.MetadataException: Unable to load the specified metadata resource.
Source Error:
Line 75: /// </summary>
Line 76: /// <param name="connectionString">Connection String</param>
Line 77: public NopObjectContext(string connectionString)
Line 78: : base(connectionString, "NopEntities")
Line 79: {
Source File: C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Data\NopObjectContext.cs Line: 77
Stack Trace:
[MetadataException: Unable to load the specified metadata resource.]
System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +2490148
System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +170
System.Data.Metadata.Edm.MetadataArtifactLoader.Create(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +8517824
System.Data.Metadata.Edm.MetadataCache.SplitPaths(String paths) +271
System.Data.Common.Utils.<>c__DisplayClass2.<Evaluate>b__0() +19
System.Data.Common.Utils.Result.GetValue() +100
System.Data.Common.Utils.Memoizer`2.Evaluate(TArg arg) +181
System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections) +292
System.Data.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection() +29
System.Data.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor) +205
System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) +27
NopSolutions.NopCommerce.BusinessLogic.Data.NopObjectContext..ctor(String connectionString) in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Data\NopObjectContext.cs:77
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType) +0
System.RuntimeMethodHandle.InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct signature, RuntimeType declaringType) +15
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +281
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1136
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
System.Activator.CreateInstance(Type type, Object[] args) +19
NopSolutions.NopCommerce.BusinessLogic.Data.AspNetObjectContextManager`1.get_ObjectContext() in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Data\AspNetObjectContextManager.cs:53
NopSolutions.NopCommerce.BusinessLogic.Data.ObjectContextHelper.get_CurrentObjectContext() in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Data\ObjectContextHelper.cs:53
NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings.SettingManager.GetAllSettings() in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Configuration\Settings\SettingManager.cs:92
NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings.SettingManager.GetSettingByName(String name) in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Configuration\Settings\SettingManager.cs:348
NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings.SettingManager.GetSettingValue(String name) in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Configuration\Settings\SettingManager.cs:314
NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings.SettingManager.GetSettingValueBoolean(String name, Boolean defaultValue) in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Configuration\Settings\SettingManager.cs:247
NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings.SettingManager.GetSettingValueBoolean(String name) in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Configuration\Settings\SettingManager.cs:236
NopSolutions.NopCommerce.BusinessLogic.Directory.LanguageManager.get_CacheEnabled() in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Directory\LanguageManager.cs:217
NopSolutions.NopCommerce.BusinessLogic.Directory.LanguageManager.GetAllLanguages(Boolean showHidden) in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\Directory\LanguageManager.cs:84
NopSolutions.NopCommerce.BusinessLogic.NopContext.get_WorkingLanguage() in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.BusinessLogic\NopContext.cs:366
NopSolutions.NopCommerce.HttpModules.MembershipHttpModule.Application_BeginRequest(Object sender, EventArgs e) in C:\Users\Will\Documents\Visual Studio 2010\Projects\proj\Libraries\Nop.HttpModules.MembershipModule\MembershipHttpModule.cs:164
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75