Entity Framework Feature Suggestions

Continued focus on Code First development.

1,273 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    DerekDerek shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    completed  ·  Diego VegaDiego Vega responded  · 

    Code First has become a fundamental feature of Entity Framework since we released version 4.1.

    There are of course many improvements we can make (some of them mentioned in the comments, like database migrations and stored procedure support), but moving forward we encourage you to add or vote as appropriate those improvements in separate items so that we can track the votes more accurately.

    29 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Chris SuttonChris Sutton commented  ·   ·  Flag as inappropriate

        che,

        Check out the Entity Framework Power Tools CTP1 Visual Studio extension. You can use it to generate an initial EF model.

      • cheche commented  ·   ·  Flag as inappropriate

        #Koistya, I agree. I like code first but I get nervous that over time my code diverges from the database. It would be great to have a tool that will show you what your code first classes are producing and how they are being mapped to the database. You may find that there are fields in the DB that you haven't mapped to anything in your code.

      • cheche commented  ·   ·  Flag as inappropriate

        Is there currently a way to point to an existing databae and have the EF generate the Code First classes?

      • CSharpMafiaCSharpMafia commented  ·   ·  Flag as inappropriate

        Definitely looking forward to this. To me, code first allows me to define my models my own way, then persist them naturally. I can see this being very useful for both prototype and full production products.

      • DarrenDarren commented  ·   ·  Flag as inappropriate

        Code first is the way forward. An RTM release would be great to be able to adopt this in commercial projects. The alternative is to use another more mature ORM framework. I would rather stay with Microsoft technologies if possible.

      • koimadkoimad commented  ·   ·  Flag as inappropriate

        Can we have simple attributes like the RegExpr Attribute in RIA Services that can generate constraints in the database.

        THis would bring attribute validation on properties into the database from one central place that can be controlled.

      • amiramir commented  ·   ·  Flag as inappropriate

        With support for Multipe page designer and synonym(Shortcut) of entities.

      • DerekDerek commented  ·   ·  Flag as inappropriate

        I agree, it's most dissapointing that we hear so little feedback on it. It's pretty obvious that this is one of the most desired aspects of the Entity Framework, yet I feel like we're being kept out of the loop quite a bit.

      • teydeteyde commented  ·   ·  Flag as inappropriate

        The most disappointing feature in CodeOnly is that it isn't shipped already. More disappointing is that nobody is informing the community of why it has to take so long. As long as the magic unicorn remains a fairytale, my choice is NHibernate.

      • John JonesJohn Jones commented  ·   ·  Flag as inappropriate

        We have an existing and (very) imperfect database, so Code First is the only way for us. We plan to ship with EF, so here's what we need most (in order):

        1. An RTM release. Just with the Code First in CTP4. Our app generally doesn't meet the critieria for go-live with an RC, so we need an RTM. By the end of 2010 would be ideal. If at the very end of 2010 or slightly after, it would be a huge help to get some hints in this direction by mid-November.

        2. Stored procedures and user defined functions -- so we can integrate them into a query. Would let us convert the messiest parts of queries into UDFs, and alleviate our worst problems with generated SQL.

        3. Support for FirstOrDefault. Would let us make queries much simpler and efficient. We were using sub-queries (tacked onto the end of the query) to get around this limitation, but this made the generated SQL incredibly complicated, and sometimes just failed. Our only solution is to use several completely separate queries, and assemble the data we need using post-query processing. FirstOrDefault with Code First would make it work, and easily.

      • Salix McMurdoSalix McMurdo commented  ·   ·  Flag as inappropriate

        Code first is great. Now it should be enhanced to give more control over what is generated in DB to ones that do want that, like, field types, indexes, unique constraints.

      • Matthew RobertsMatthew Roberts commented  ·   ·  Flag as inappropriate

        Really love code first. Can't wait for the official beta with a go-live license. Please make it soon!!!

      • PaulPaul commented  ·   ·  Flag as inappropriate

        Really liking Code First and pleased to hear that using it with existing databases is now seen as a core aspect of it. It would be helpful to have some sort of indication as to when a full release will be available (we would love to use this in a production environment as Code First is working so well in a prototype).

        A couple of things:
        Would also like to see support for Self Tracking Entities feature similar to what is available for Database and Model First developers, please see Rowan's answer for more info on what I'm talking about:
        http://social.msdn.microsoft.com/Forums/en/adonetefx/thread/4d8af696-6054-4acb-b616-430eecf86b3d

        Looking forward to support for enumerations in Code First.

      ← Previous 1

      Feedback and Knowledge Base