none
OnModelCreating - no suitable method found to override RRS feed

  • Question

  • I cannot figure out why I cannot add OnModelCreating to my DbContext.

    When I select "Show potential fixes" I am only offered to generate a class.

    Thank you!


    • Edited by vbMark Wednesday, October 22, 2014 12:52 PM
    Wednesday, October 22, 2014 12:50 PM

Answers

  • Are you using EF7? That method is no longer there then.

    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    • Marked as answer by vbMark Wednesday, October 22, 2014 7:43 PM
    Wednesday, October 22, 2014 6:35 PM

All replies

  • Are you using EF7? That method is no longer there then.

    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    • Marked as answer by vbMark Wednesday, October 22, 2014 7:43 PM
    Wednesday, October 22, 2014 6:35 PM
  • I was beginning to think this was a part of the trimming down of EF and the new direction.

    Makes sense.

    Thank you.

    Wednesday, October 22, 2014 7:43 PM
  • What's the alternative to OnModelCreating in EF7?
    Tuesday, November 20, 2018 10:20 PM