none
Entity Framework POCOs. Can I override Equals Method? RRS feed

  • Question

  • I am writing POCOs for entity framework. I want to overide the Equals method of the POCO.

    Is it OK.

    Also is it OK if I add some methods to my POCOs?

    Thursday, May 22, 2014 9:06 PM

Answers

  • I am writing POCOs for entity framework. I want to overide the Equals method of the POCO.

    Is it OK.

    If the method is overridable, why not?

    Also is it OK if I add some methods to my POCOs?

    If the POCO is auto generated as a partial class, then you can extend the behavior of the POCO by using a partial class without disturbing the auto-generated code in the POCO.

    Friday, May 23, 2014 3:18 PM