locked
DynamicData EFProvider 6.0.0 & VB.Net Won't Build RRS feed

  • Question

  • User14123639 posted

    Howdy,

    I'm trying to generate a simple Dynamic Data website for administration using Visual Studio 2013.  I've followed this link: http://www.c-sharpcorner.com/UploadFile/4b0136/getting-started-with-preview-of-dynamic-data-and-entity-data/ and

    1. Created a "Visual Studio 2012 - ASP.Net Dynamic Data Entities Web Application"

    2. Using nuget installed the "Microsoft.AspNet.DynamicData.EFProvider"

    3. Un-commented the DbContext line in the Global.asax.vb file.  

    When I compile I get the following warnings and errors:

    Warning    1    Namespace or type specified in the Imports 'System.Data.Objects' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany.ascx.vb    3    9    SampleApp1
    Warning    2    Namespace or type specified in the Imports 'System.Data.Objects.DataClasses' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany.ascx.vb    4    9    SampleApp1
    Error    3    Type 'RelatedEnd' is not defined.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany.ascx.vb    21    62    SampleApp1
    Warning    4    Namespace or type specified in the Imports 'System.Data.Objects' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany_Edit.ascx.vb    4    9    SampleApp1
    Warning    5    Namespace or type specified in the Imports 'System.Data.Objects.DataClasses' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany_Edit.ascx.vb    5    9    SampleApp1
    Error    6    Type 'ObjectContext' is not defined.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany_Edit.ascx.vb    10    43    SampleApp1
    Error    7    Type 'ObjectContext' is not defined.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany_Edit.ascx.vb    14    22    SampleApp1
    Error    8    Type 'ObjectContext' is not defined.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany_Edit.ascx.vb    18    32    SampleApp1
    Error    9    Reference required to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the type 'System.Data.Objects.ObjectContext'. Add one to your project.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany_Edit.ascx.vb    29    25    SampleApp1
    Error    10    Reference required to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the type 'System.Data.Objects.ObjectContext'. Add one to your project.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany_Edit.ascx.vb    39    63    SampleApp1
    Error    11    Type 'RelatedEnd' is not defined.    ...\SampleApp1\DynamicData\FieldTemplates\ManyToMany_Edit.ascx.vb    79    66    SampleApp1

    If I add a reference to System.Data.Entity I get a runtime error on the RegisterContext that says:

    "The context type 'SampleApp1.LSICountyEntities' is not supported."

    I also tried Uninstalling EF 6.0.0 which is what is installed with the DynamicData EFProvider and installing the current EF 6.1.3 and get the same thing.

    Any help would be appreciated.

    Friday, June 26, 2015 11:09 AM

All replies

  • User-84896714 posted

    Hi dblwizard,
    Thank you for your post.

    dblwizard

    http://www.c-sharpcorner.com/UploadFile/4b0136/getting-started-with-preview-of-dynamic-data-and-entity-data/

    I followed the article you provided, it works fine on my side.

    As the article said, you could use the code below to RegisterContext instead of Un-commented the default one.

     DefaultModel.RegisterContext(
         new Microsoft.AspNet.DynamicData.ModelProviders.EFDataModelProvider(() => new YourEntities()),
         new ContextConfiguration { ScaffoldAllTables = true });

    Hoping my reply could be helpful to you.
    Best Regards,
    Wang Li

    Monday, June 29, 2015 2:43 AM
  • User-330204900 posted

    Hi Li, you are correct I have tried the same and it work fine for me to, could dblwizard try a new project please and see if that works.

    Monday, June 29, 2015 4:55 AM
  • User14123639 posted

    Your comment would imply that you did the article in C# and not in VB.net.  Can you confirm which language you did it in?

    Thanks

    dbl

    Monday, June 29, 2015 10:24 AM
  • User-330204900 posted

    Sorry I've never written any articles on there sorry, and I have only done articles in C# yes

    Monday, June 29, 2015 11:37 AM
  • User-84896714 posted

    Hi dblwizard,

    I tested vb.net version, Microsoft.AspNet.DynamicData.EFProvider don't provider vb.net template.

    Best Regard,

    Wang Li

    Tuesday, June 30, 2015 4:07 AM
  • User14123639 posted

    So is Microsoft abandoning DynamicData?  the 6.0 EFProvider has been out for well over a year with this deficiency and they still haven't addressed it?

    Friday, July 3, 2015 10:48 AM
  • User-84896714 posted

    Hi dblwizard,

    I suggest you create a C# project  to use DynamicData.

    Best Regards,

    Wang Li

    Tuesday, July 7, 2015 4:52 AM
  • User14123639 posted

    Yeah, that doesn't help me a great deal.  I was trying to incorporate this into an existing VB.Net project.  The other developer on this team is a vb.net developer so I need this piece to be vb.

    Thanks

    Tuesday, July 7, 2015 10:50 AM
  • User-330204900 posted

    I'll look into it for you and ask the Asp.net team if I get nowhere.

    Wednesday, July 8, 2015 5:47 AM
  • User14123639 posted

    I got it to work.  There were not a significant amount of changes ... had to remove a bunch of .cs files from the DynamicData sub folders and then using a cs generated project I made the rest of the changes.  It would still be nice if they would publish a VB one or if they are abandoning DynamicData to let us know if they are replacing it with anything.

    Wednesday, July 8, 2015 10:38 AM
  • User-330204900 posted

    I think DD will not get any major enhancements with the new MVC 5 that is in the works as there is no support for web forms in there. but you never know what they may come up with :)

    Wednesday, July 8, 2015 1:48 PM
  • User14123639 posted

    So if Web Forms only has limited support moving forward is the "Scaffolding" the recommended way to have quick easy access using MVC 5?

    Thursday, July 16, 2015 12:57 PM
  • User-330204900 posted

    Hi I did not say limited support :) it will be fully supported but I can't see any major enhancements for Web Forms going forward.

    Friday, July 17, 2015 6:04 AM
  • User14123639 posted

    Ok, poor choice of words, there I guess.  That's what I meant by limited ... it would function but nothing new would be released.  In other words it's dieing.  So what is the "recommended" MVC replacement for DynamicData?

    Friday, July 17, 2015 10:24 AM
  • User-330204900 posted

    Yes that would be true, however I have an open source project I have been working on that I will be releasing soon, been too busy with paying work to get on it but I need to make the time and that has many enhancements to DD.

    Saturday, July 18, 2015 4:49 AM