The entity type List`1 is not part of the model for the current context












20















I've been using Database First, EF 4.1



I am getting "The entity type List`1 is not part of the model for the current context." error when trying to update a record from my Edit View.



The error is occurring at



db.Entry(properties).State = EntityState.Modified;


Here is my Model:



public class Users
{
[Key]
public int User_ID { get; set; }
public string UserName { get; set; }

[NotMapped]
public IEnumerable<App_Properties> User_Properties
{
get { return Properties.Where(u => u.User_ID == User_ID); }
}

public virtual ICollection<App_Properties> Properties { get; set; }
}

public class App_Properties
{
[Key]
public int Prop_ID { get; set; }
public int User_ID { get; set; }
public int App_ID { get; set; }
public string Key { get; set; }
public string Value { get; set; }
public DateTime DateEntered { get; set; }
public DateTime DateModified { get; set; }

[ForeignKey("User_ID")]
public virtual Users Users { get; set; }
}


Here is my Controller:



[HttpPost]
public ActionResult Edit(ICollection<App_Properties> properties)
{
if (ModelState.IsValid)
{
foreach (var item in properties)
{
db.Entry(properties).State = EntityState.Modified;
}

db.SaveChanges();

return RedirectToAction("Index");
}

return View(properties);
}


I suspect the foreach loop is not appropriate in setting the EntityState for each item in an ICollection.



Any assistance would be greatly appreciated.










share|improve this question


















  • 1





    A quick semantic note, the name App_Properties.Users would imply multiple users, not one. Convention tends to be that a single object has a singular name as saying var users = new Users() implies a collection of people, not a single item.

    – Leniency
    Mar 27 '12 at 19:53











  • Yeah, thanks... I have no control of the DB and I let the improper naming of the tables propagate down into my code.

    – Isaac Vallee
    Mar 27 '12 at 22:17











  • The db names don't have to though - it's very easy to change the mapping of your POCO to the actual database table OnModelCreating: modelBuilder.Entity<User>().ToTable("Users"). A simple F2 rename on the Users class will then propagate the rename across your project. Same with property names - you can custom map any of it. weblogs.asp.net/scottgu/archive/2010/07/23/…

    – Leniency
    Mar 28 '12 at 1:16
















20















I've been using Database First, EF 4.1



I am getting "The entity type List`1 is not part of the model for the current context." error when trying to update a record from my Edit View.



The error is occurring at



db.Entry(properties).State = EntityState.Modified;


Here is my Model:



public class Users
{
[Key]
public int User_ID { get; set; }
public string UserName { get; set; }

[NotMapped]
public IEnumerable<App_Properties> User_Properties
{
get { return Properties.Where(u => u.User_ID == User_ID); }
}

public virtual ICollection<App_Properties> Properties { get; set; }
}

public class App_Properties
{
[Key]
public int Prop_ID { get; set; }
public int User_ID { get; set; }
public int App_ID { get; set; }
public string Key { get; set; }
public string Value { get; set; }
public DateTime DateEntered { get; set; }
public DateTime DateModified { get; set; }

[ForeignKey("User_ID")]
public virtual Users Users { get; set; }
}


Here is my Controller:



[HttpPost]
public ActionResult Edit(ICollection<App_Properties> properties)
{
if (ModelState.IsValid)
{
foreach (var item in properties)
{
db.Entry(properties).State = EntityState.Modified;
}

db.SaveChanges();

return RedirectToAction("Index");
}

return View(properties);
}


I suspect the foreach loop is not appropriate in setting the EntityState for each item in an ICollection.



Any assistance would be greatly appreciated.










share|improve this question


















  • 1





    A quick semantic note, the name App_Properties.Users would imply multiple users, not one. Convention tends to be that a single object has a singular name as saying var users = new Users() implies a collection of people, not a single item.

    – Leniency
    Mar 27 '12 at 19:53











  • Yeah, thanks... I have no control of the DB and I let the improper naming of the tables propagate down into my code.

    – Isaac Vallee
    Mar 27 '12 at 22:17











  • The db names don't have to though - it's very easy to change the mapping of your POCO to the actual database table OnModelCreating: modelBuilder.Entity<User>().ToTable("Users"). A simple F2 rename on the Users class will then propagate the rename across your project. Same with property names - you can custom map any of it. weblogs.asp.net/scottgu/archive/2010/07/23/…

    – Leniency
    Mar 28 '12 at 1:16














20












20








20


4






I've been using Database First, EF 4.1



I am getting "The entity type List`1 is not part of the model for the current context." error when trying to update a record from my Edit View.



The error is occurring at



db.Entry(properties).State = EntityState.Modified;


Here is my Model:



public class Users
{
[Key]
public int User_ID { get; set; }
public string UserName { get; set; }

[NotMapped]
public IEnumerable<App_Properties> User_Properties
{
get { return Properties.Where(u => u.User_ID == User_ID); }
}

public virtual ICollection<App_Properties> Properties { get; set; }
}

public class App_Properties
{
[Key]
public int Prop_ID { get; set; }
public int User_ID { get; set; }
public int App_ID { get; set; }
public string Key { get; set; }
public string Value { get; set; }
public DateTime DateEntered { get; set; }
public DateTime DateModified { get; set; }

[ForeignKey("User_ID")]
public virtual Users Users { get; set; }
}


Here is my Controller:



[HttpPost]
public ActionResult Edit(ICollection<App_Properties> properties)
{
if (ModelState.IsValid)
{
foreach (var item in properties)
{
db.Entry(properties).State = EntityState.Modified;
}

db.SaveChanges();

return RedirectToAction("Index");
}

return View(properties);
}


I suspect the foreach loop is not appropriate in setting the EntityState for each item in an ICollection.



Any assistance would be greatly appreciated.










share|improve this question














I've been using Database First, EF 4.1



I am getting "The entity type List`1 is not part of the model for the current context." error when trying to update a record from my Edit View.



The error is occurring at



db.Entry(properties).State = EntityState.Modified;


Here is my Model:



public class Users
{
[Key]
public int User_ID { get; set; }
public string UserName { get; set; }

[NotMapped]
public IEnumerable<App_Properties> User_Properties
{
get { return Properties.Where(u => u.User_ID == User_ID); }
}

public virtual ICollection<App_Properties> Properties { get; set; }
}

public class App_Properties
{
[Key]
public int Prop_ID { get; set; }
public int User_ID { get; set; }
public int App_ID { get; set; }
public string Key { get; set; }
public string Value { get; set; }
public DateTime DateEntered { get; set; }
public DateTime DateModified { get; set; }

[ForeignKey("User_ID")]
public virtual Users Users { get; set; }
}


Here is my Controller:



[HttpPost]
public ActionResult Edit(ICollection<App_Properties> properties)
{
if (ModelState.IsValid)
{
foreach (var item in properties)
{
db.Entry(properties).State = EntityState.Modified;
}

db.SaveChanges();

return RedirectToAction("Index");
}

return View(properties);
}


I suspect the foreach loop is not appropriate in setting the EntityState for each item in an ICollection.



Any assistance would be greatly appreciated.







c# asp.net-mvc-3 entity-framework-4.1






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 27 '12 at 19:44









Isaac ValleeIsaac Vallee

112117




112117








  • 1





    A quick semantic note, the name App_Properties.Users would imply multiple users, not one. Convention tends to be that a single object has a singular name as saying var users = new Users() implies a collection of people, not a single item.

    – Leniency
    Mar 27 '12 at 19:53











  • Yeah, thanks... I have no control of the DB and I let the improper naming of the tables propagate down into my code.

    – Isaac Vallee
    Mar 27 '12 at 22:17











  • The db names don't have to though - it's very easy to change the mapping of your POCO to the actual database table OnModelCreating: modelBuilder.Entity<User>().ToTable("Users"). A simple F2 rename on the Users class will then propagate the rename across your project. Same with property names - you can custom map any of it. weblogs.asp.net/scottgu/archive/2010/07/23/…

    – Leniency
    Mar 28 '12 at 1:16














  • 1





    A quick semantic note, the name App_Properties.Users would imply multiple users, not one. Convention tends to be that a single object has a singular name as saying var users = new Users() implies a collection of people, not a single item.

    – Leniency
    Mar 27 '12 at 19:53











  • Yeah, thanks... I have no control of the DB and I let the improper naming of the tables propagate down into my code.

    – Isaac Vallee
    Mar 27 '12 at 22:17











  • The db names don't have to though - it's very easy to change the mapping of your POCO to the actual database table OnModelCreating: modelBuilder.Entity<User>().ToTable("Users"). A simple F2 rename on the Users class will then propagate the rename across your project. Same with property names - you can custom map any of it. weblogs.asp.net/scottgu/archive/2010/07/23/…

    – Leniency
    Mar 28 '12 at 1:16








1




1





A quick semantic note, the name App_Properties.Users would imply multiple users, not one. Convention tends to be that a single object has a singular name as saying var users = new Users() implies a collection of people, not a single item.

– Leniency
Mar 27 '12 at 19:53





A quick semantic note, the name App_Properties.Users would imply multiple users, not one. Convention tends to be that a single object has a singular name as saying var users = new Users() implies a collection of people, not a single item.

– Leniency
Mar 27 '12 at 19:53













Yeah, thanks... I have no control of the DB and I let the improper naming of the tables propagate down into my code.

– Isaac Vallee
Mar 27 '12 at 22:17





Yeah, thanks... I have no control of the DB and I let the improper naming of the tables propagate down into my code.

– Isaac Vallee
Mar 27 '12 at 22:17













The db names don't have to though - it's very easy to change the mapping of your POCO to the actual database table OnModelCreating: modelBuilder.Entity<User>().ToTable("Users"). A simple F2 rename on the Users class will then propagate the rename across your project. Same with property names - you can custom map any of it. weblogs.asp.net/scottgu/archive/2010/07/23/…

– Leniency
Mar 28 '12 at 1:16





The db names don't have to though - it's very easy to change the mapping of your POCO to the actual database table OnModelCreating: modelBuilder.Entity<User>().ToTable("Users"). A simple F2 rename on the Users class will then propagate the rename across your project. Same with property names - you can custom map any of it. weblogs.asp.net/scottgu/archive/2010/07/23/…

– Leniency
Mar 28 '12 at 1:16












4 Answers
4






active

oldest

votes


















52














Try changing your loop to:



foreach (var item in properties)
{
db.Entry(item).State = EntityState.Modified;
}


You were calling db.Entry(properties), so you were trying to attach the whole collection at once. DbContext.Entry(object) expects a single object, not a collection.






share|improve this answer





















  • 1





    Thanks.. That got rid of that error but added a "Object with same key already exists in objectstatemanager error." I was able to get help with that error from stackoverflow.com/questions/8254854/….

    – Isaac Vallee
    Mar 27 '12 at 21:00











  • Thanks ... this was helpful

    – Rush.2707
    Nov 18 '16 at 10:12











  • I got an idea from your answer so I did the following: I am using code first approach with LazyLoadingEnabled = false I had a collection of actions against a status so I loaded then like that dbContext.Entry(status).Collection(c=>c.Actions).Load();

    – Asad Naeem
    Jan 16 at 7:05













  • It worked fine but issue arises when I found that there is an object which is related to each Action NextStatus so I used the following: foreach(var a in status.Actions) { dbContext.Entry(a).Reference(c=>c.nextStatsu).Load(); }

    – Asad Naeem
    Jan 16 at 7:12



















11














Thanks, Leniency, for the answer. Worked great.



For what it's worth, I prefer to keep my EntityState.Modified assignments on a single line (as I have multiples) so used the following LINQ:



properties.ForEach(p => db.Entry(p).State = EntityState.Modified);





share|improve this answer































    0














    I ended up here despite using code-first EF. The answer to the problem for me was simply not to try to pass a list of entities to the insert method, but insert them one at a time instead:



    entityList.ForEach(context.Insert);






    share|improve this answer































      0














      i think you can use this code for this problem. Because if you use it, you will met another problem. Now i fixed my problem and i hope it will work for you



      foreach (var item in properties)
      {
      var oldEntity = FGetById(item.Id); // You can use find instead of FGetById
      context.Entry(oldEntity).CurrentValues.SetValues(item);
      Update(oldEntity);
      }





      share|improve this answer

























        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f9896569%2fthe-entity-type-list1-is-not-part-of-the-model-for-the-current-context%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        52














        Try changing your loop to:



        foreach (var item in properties)
        {
        db.Entry(item).State = EntityState.Modified;
        }


        You were calling db.Entry(properties), so you were trying to attach the whole collection at once. DbContext.Entry(object) expects a single object, not a collection.






        share|improve this answer





















        • 1





          Thanks.. That got rid of that error but added a "Object with same key already exists in objectstatemanager error." I was able to get help with that error from stackoverflow.com/questions/8254854/….

          – Isaac Vallee
          Mar 27 '12 at 21:00











        • Thanks ... this was helpful

          – Rush.2707
          Nov 18 '16 at 10:12











        • I got an idea from your answer so I did the following: I am using code first approach with LazyLoadingEnabled = false I had a collection of actions against a status so I loaded then like that dbContext.Entry(status).Collection(c=>c.Actions).Load();

          – Asad Naeem
          Jan 16 at 7:05













        • It worked fine but issue arises when I found that there is an object which is related to each Action NextStatus so I used the following: foreach(var a in status.Actions) { dbContext.Entry(a).Reference(c=>c.nextStatsu).Load(); }

          – Asad Naeem
          Jan 16 at 7:12
















        52














        Try changing your loop to:



        foreach (var item in properties)
        {
        db.Entry(item).State = EntityState.Modified;
        }


        You were calling db.Entry(properties), so you were trying to attach the whole collection at once. DbContext.Entry(object) expects a single object, not a collection.






        share|improve this answer





















        • 1





          Thanks.. That got rid of that error but added a "Object with same key already exists in objectstatemanager error." I was able to get help with that error from stackoverflow.com/questions/8254854/….

          – Isaac Vallee
          Mar 27 '12 at 21:00











        • Thanks ... this was helpful

          – Rush.2707
          Nov 18 '16 at 10:12











        • I got an idea from your answer so I did the following: I am using code first approach with LazyLoadingEnabled = false I had a collection of actions against a status so I loaded then like that dbContext.Entry(status).Collection(c=>c.Actions).Load();

          – Asad Naeem
          Jan 16 at 7:05













        • It worked fine but issue arises when I found that there is an object which is related to each Action NextStatus so I used the following: foreach(var a in status.Actions) { dbContext.Entry(a).Reference(c=>c.nextStatsu).Load(); }

          – Asad Naeem
          Jan 16 at 7:12














        52












        52








        52







        Try changing your loop to:



        foreach (var item in properties)
        {
        db.Entry(item).State = EntityState.Modified;
        }


        You were calling db.Entry(properties), so you were trying to attach the whole collection at once. DbContext.Entry(object) expects a single object, not a collection.






        share|improve this answer















        Try changing your loop to:



        foreach (var item in properties)
        {
        db.Entry(item).State = EntityState.Modified;
        }


        You were calling db.Entry(properties), so you were trying to attach the whole collection at once. DbContext.Entry(object) expects a single object, not a collection.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 27 '12 at 20:01

























        answered Mar 27 '12 at 19:55









        LeniencyLeniency

        4,3041832




        4,3041832








        • 1





          Thanks.. That got rid of that error but added a "Object with same key already exists in objectstatemanager error." I was able to get help with that error from stackoverflow.com/questions/8254854/….

          – Isaac Vallee
          Mar 27 '12 at 21:00











        • Thanks ... this was helpful

          – Rush.2707
          Nov 18 '16 at 10:12











        • I got an idea from your answer so I did the following: I am using code first approach with LazyLoadingEnabled = false I had a collection of actions against a status so I loaded then like that dbContext.Entry(status).Collection(c=>c.Actions).Load();

          – Asad Naeem
          Jan 16 at 7:05













        • It worked fine but issue arises when I found that there is an object which is related to each Action NextStatus so I used the following: foreach(var a in status.Actions) { dbContext.Entry(a).Reference(c=>c.nextStatsu).Load(); }

          – Asad Naeem
          Jan 16 at 7:12














        • 1





          Thanks.. That got rid of that error but added a "Object with same key already exists in objectstatemanager error." I was able to get help with that error from stackoverflow.com/questions/8254854/….

          – Isaac Vallee
          Mar 27 '12 at 21:00











        • Thanks ... this was helpful

          – Rush.2707
          Nov 18 '16 at 10:12











        • I got an idea from your answer so I did the following: I am using code first approach with LazyLoadingEnabled = false I had a collection of actions against a status so I loaded then like that dbContext.Entry(status).Collection(c=>c.Actions).Load();

          – Asad Naeem
          Jan 16 at 7:05













        • It worked fine but issue arises when I found that there is an object which is related to each Action NextStatus so I used the following: foreach(var a in status.Actions) { dbContext.Entry(a).Reference(c=>c.nextStatsu).Load(); }

          – Asad Naeem
          Jan 16 at 7:12








        1




        1





        Thanks.. That got rid of that error but added a "Object with same key already exists in objectstatemanager error." I was able to get help with that error from stackoverflow.com/questions/8254854/….

        – Isaac Vallee
        Mar 27 '12 at 21:00





        Thanks.. That got rid of that error but added a "Object with same key already exists in objectstatemanager error." I was able to get help with that error from stackoverflow.com/questions/8254854/….

        – Isaac Vallee
        Mar 27 '12 at 21:00













        Thanks ... this was helpful

        – Rush.2707
        Nov 18 '16 at 10:12





        Thanks ... this was helpful

        – Rush.2707
        Nov 18 '16 at 10:12













        I got an idea from your answer so I did the following: I am using code first approach with LazyLoadingEnabled = false I had a collection of actions against a status so I loaded then like that dbContext.Entry(status).Collection(c=>c.Actions).Load();

        – Asad Naeem
        Jan 16 at 7:05







        I got an idea from your answer so I did the following: I am using code first approach with LazyLoadingEnabled = false I had a collection of actions against a status so I loaded then like that dbContext.Entry(status).Collection(c=>c.Actions).Load();

        – Asad Naeem
        Jan 16 at 7:05















        It worked fine but issue arises when I found that there is an object which is related to each Action NextStatus so I used the following: foreach(var a in status.Actions) { dbContext.Entry(a).Reference(c=>c.nextStatsu).Load(); }

        – Asad Naeem
        Jan 16 at 7:12





        It worked fine but issue arises when I found that there is an object which is related to each Action NextStatus so I used the following: foreach(var a in status.Actions) { dbContext.Entry(a).Reference(c=>c.nextStatsu).Load(); }

        – Asad Naeem
        Jan 16 at 7:12













        11














        Thanks, Leniency, for the answer. Worked great.



        For what it's worth, I prefer to keep my EntityState.Modified assignments on a single line (as I have multiples) so used the following LINQ:



        properties.ForEach(p => db.Entry(p).State = EntityState.Modified);





        share|improve this answer




























          11














          Thanks, Leniency, for the answer. Worked great.



          For what it's worth, I prefer to keep my EntityState.Modified assignments on a single line (as I have multiples) so used the following LINQ:



          properties.ForEach(p => db.Entry(p).State = EntityState.Modified);





          share|improve this answer


























            11












            11








            11







            Thanks, Leniency, for the answer. Worked great.



            For what it's worth, I prefer to keep my EntityState.Modified assignments on a single line (as I have multiples) so used the following LINQ:



            properties.ForEach(p => db.Entry(p).State = EntityState.Modified);





            share|improve this answer













            Thanks, Leniency, for the answer. Worked great.



            For what it's worth, I prefer to keep my EntityState.Modified assignments on a single line (as I have multiples) so used the following LINQ:



            properties.ForEach(p => db.Entry(p).State = EntityState.Modified);






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 29 '13 at 4:39









            JonathanJonathan

            2,77921630




            2,77921630























                0














                I ended up here despite using code-first EF. The answer to the problem for me was simply not to try to pass a list of entities to the insert method, but insert them one at a time instead:



                entityList.ForEach(context.Insert);






                share|improve this answer




























                  0














                  I ended up here despite using code-first EF. The answer to the problem for me was simply not to try to pass a list of entities to the insert method, but insert them one at a time instead:



                  entityList.ForEach(context.Insert);






                  share|improve this answer


























                    0












                    0








                    0







                    I ended up here despite using code-first EF. The answer to the problem for me was simply not to try to pass a list of entities to the insert method, but insert them one at a time instead:



                    entityList.ForEach(context.Insert);






                    share|improve this answer













                    I ended up here despite using code-first EF. The answer to the problem for me was simply not to try to pass a list of entities to the insert method, but insert them one at a time instead:



                    entityList.ForEach(context.Insert);







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 17 '18 at 11:20









                    Ian GraingerIan Grainger

                    2,88423056




                    2,88423056























                        0














                        i think you can use this code for this problem. Because if you use it, you will met another problem. Now i fixed my problem and i hope it will work for you



                        foreach (var item in properties)
                        {
                        var oldEntity = FGetById(item.Id); // You can use find instead of FGetById
                        context.Entry(oldEntity).CurrentValues.SetValues(item);
                        Update(oldEntity);
                        }





                        share|improve this answer






























                          0














                          i think you can use this code for this problem. Because if you use it, you will met another problem. Now i fixed my problem and i hope it will work for you



                          foreach (var item in properties)
                          {
                          var oldEntity = FGetById(item.Id); // You can use find instead of FGetById
                          context.Entry(oldEntity).CurrentValues.SetValues(item);
                          Update(oldEntity);
                          }





                          share|improve this answer




























                            0












                            0








                            0







                            i think you can use this code for this problem. Because if you use it, you will met another problem. Now i fixed my problem and i hope it will work for you



                            foreach (var item in properties)
                            {
                            var oldEntity = FGetById(item.Id); // You can use find instead of FGetById
                            context.Entry(oldEntity).CurrentValues.SetValues(item);
                            Update(oldEntity);
                            }





                            share|improve this answer















                            i think you can use this code for this problem. Because if you use it, you will met another problem. Now i fixed my problem and i hope it will work for you



                            foreach (var item in properties)
                            {
                            var oldEntity = FGetById(item.Id); // You can use find instead of FGetById
                            context.Entry(oldEntity).CurrentValues.SetValues(item);
                            Update(oldEntity);
                            }






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Nov 27 '18 at 7:26

























                            answered Nov 6 '18 at 8:42









                            malikmalik

                            92




                            92






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f9896569%2fthe-entity-type-list1-is-not-part-of-the-model-for-the-current-context%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Lallio

                                Futebolista

                                Jornalista