Page 1 of 1

Editing DbContext Template

Posted: Wed 01 Oct 2014 14:47
by PatConnelly
Good Day,

I'm getting a syntax error in the DbContext error when I do the following:

1) Delete old DbContext template from the model.
2) Add a new DbContext from the built-in templates.
3) Double click on the template to edit it.

At this point, without making any changes to the template, the follow errors appear:

Code: Select all

Error	30	Semicolon expected	DbContext	3171	153	
Error	31	Syntax error	       DbContext	3171	153	
The code in that area is:

Code: Select all

3167      XmlReader mappingReader = XmlReader.Create(edmx.Msl.Stream, settings);
3168      ConstructorInfo storageMappingItemCollectionConstructor = ef6Assembly.GetType("System.Data.Entity.Core.Mapping.StorageMappingItemCollection")
3169        .GetConstructor(new Type[] { conceptualItems.GetType(), storeItems.GetType(), typeof(IEnumerable<XmlReader>) });
3170      object mappingItems = storageMappingItemCollectionConstructor.Invoke(new object[] { conceptualItems, storeItems, new XmlReader[] { mappingReader }.AsEnumerable() });
3171	
3172      object errors = Activator.CreateInstance(typeof(List<>).MakeGenericType(ef6Assembly.GetType("System.Data.Entity.Core.Metadata.Edm.EdmSchemaError")));
3173			
3174	    MethodInfo generateViewsMethod = mappingItems
3175		    .GetType()
3176		    .GetMethods(BindingFlags.Instance | BindingFlags.Public)
3177		    .First(mi => mi.Name == "GenerateViews" && mi.GetParameters().Length == 1);
 
Thanks,

Patrick Connelly

Re: Editing DbContext Template

Posted: Thu 02 Oct 2014 09:34
by Shalex
Thank you for your report. We have reproduced the issue and are investigating it.

Re: Editing DbContext Template

Posted: Fri 10 Oct 2014 10:11
by Shalex
The bug is fixed in the new (5.7.461) build of Entity Developer. Please try it and notify us about the result.