Results 1 to 9 of 9

Thread: Entity Framework 4

  1. #1
    Join Date
    Aug 2011
    Posts
    2

    Question Entity Framework 4

    Has there been any effort to bring EF4+ support to Spring.NET? Or has anyone already successfully used the two frameworks together?

  2. #2
    Join Date
    Jul 2010
    Posts
    245

    Default

    This is actually something that we are considering adding for SPRNET 2.0 (target release end of 2011). Do you have an actual use-case for this or are you merely curious?

    -Steve B.

  3. #3
    Join Date
    Aug 2011
    Posts
    2

    Default Ef4.1

    Yes we are considering using EF4.1 with Spring.net and hopefully use spring for things like transaction management and dependency injection. We have had issues with using nHibernate with its lacking Linq support and EF4.1 seems to cover most of what nHibernate provides with better linq features and tooling support.

  4. #4
    Join Date
    Jul 2010
    Posts
    245

    Default

    That's quite helpful -- thanks for the pointer to that codeplex project. Its a pretty good start at an example of how to compose existing Spring.NET functionality around EF. We're looking to try to formalize explicit support for EF within SPRNET 2.0 similar to the manner in which we offer direct support for NH within the SPRNET 2.0 time-frame (end of 2011).

    If anyone is interested in SPRNET/EF integration, it would be helpful if you would follow this JIRA issue https://jira.springsource.org/browse/SPRNET-670 (which has now been updated to reflect SPRNET 2.0 as its release target) and assist in testing out the nightly builds at http://springframework.net/downloads/nightly once this work is incorporated into the project.

    -Steve B.

  5. #5
    Join Date
    Mar 2012
    Posts
    3

    Default

    Is there a new time-frame for when SPRNET 2.0 with Entity Framework 4.0 will be released?

  6. #6
    Join Date
    Mar 2012
    Posts
    2

    Default

    The first release of Entity Framework shipped in .NET Framework 3.5 SP1 and Visual Studio 2008. Since then, we have been focused on incorporating your feedback and enabling the scenarios that you wanted us to work on.

  7. #7
    Join Date
    Mar 2012
    Posts
    3

    Default

    So is there a suggested approach for Spring.Net and Entity Framework 4? I am aware that Entity Framework 4 is out and have been using it but the question was more directed toward the incorporation of it in Spring.Net.

  8. #8
    Join Date
    Apr 2012
    Posts
    3

    Default

    I have a problem with connectionString in Entity Framework with Spring.NET

    How delcare providerName?

    The browser said: Not declared attribute 'providerName'.

    My DAO.xml is this:

    <objects xmlns="http://www.springframework.net" xmlns:db="http://www.springframework.net/database" >

    <dbrovider id="XXXDBEntities"
    provider="System.Data.SqlClient"
    connectionString="metadata=res://*/XXXDataModel.csdl|res://*/XXXDataModel.ssdl|res://*/XXXDataModel.msl;provider=System.Data.SqlClient;pr ovider connection string=&quot;data source=XXX\XXX;initial catalog=XXXDB;user id=XXX;password=XXX;multipleactiveresultsets=True; App=EntityFramework&quot;"
    providerName="System.Data.EntityClient" />

    <object id="adoTemplate" type="Spring.Data.Core.AdoTemplate, Spring.Data">
    <property name="DbProvider" ref="XXXDBEntities"/>
    </object>

    <object id="ExampleDAO" type="XXX.DAO.ExampleDAO, XXX.DAO">
    </object>
    </objects>

    My XXXModel.Context is this:

    namespace XXX.DAO
    {
    public partial class XXXDBEntities : ObjectContext
    {
    public const string ConnectionString = "name=XXXDBEntities";
    public const string ContainerName = "XXXDBEntities";

    #region Constructors

    public XXXDBEntities()
    : base(ConnectionString, ContainerName) //If not providerName ArgumentException:The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
    {
    Initialize();
    }
    //Another code here...
    }
    }

    I'm using .NET 4.0 and Spring 1.3.2
    All my IoC is build with Spring.NET and this little problem I can't resolve.

  9. #9
    Join Date
    Apr 2012
    Posts
    3

    Question connectionString Entity Framework with Spring.NET

    I have a problem with connectionString in Entity Framework with Spring.NET

    How delcare providerName?

    The browser said: Not declared attribute 'providerName'.

    My DAO.xml is this:

    <objects xmlns="http://www.springframework.net" xmlns:db="http://www.springframework.net/database" >

    <db:provider id="XXXDBEntities"
    provider="System.Data.SqlClient"
    connectionString="metadata=res://*/XXXDataModel.csdl|res://*/XXXDataModel.ssdl|res://*/XXXDataModel.msl;provider=System.Data.SqlClient;pr ovider connection string=&quot;data source=XXX\XXX;initial catalog=XXXDB;user id=XXX;password=XXX;multipleactiveresultsets=True; App=EntityFramework&quot;"
    providerName="System.Data.EntityClient" />

    <object id="adoTemplate" type="Spring.Data.Core.AdoTemplate, Spring.Data">
    <property name="DbProvider" ref="XXXDBEntities"/>
    </object>

    <object id="ExampleDAO" type="XXX.DAO.ExampleDAO, XXX.DAO">
    </object>
    </objects>

    My XXXModel.Context is this:

    namespace XXX.DAO
    {
    public partial class XXXDBEntities : ObjectContext
    {
    public const string ConnectionString = "name=XXXDBEntities";
    public const string ContainerName = "XXXDBEntities";

    #region Constructors

    public XXXDBEntities()
    : base(ConnectionString, ContainerName) //If not providerName ArgumentException:The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
    {
    Initialize();
    }
    //Another code here...
    }
    }

    I'm using .NET 4.0 and Spring 1.3.2
    All my IoC is build with Spring.NET and this little problem I can't resolve.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •