Add method to auto-generated class

How can I add bool Equals(object obj) method to class that is created automatically (in my case by edmx model).

One solution that I mean is to inherit this class and use this new class, but I'm looking for something different.

Answers


The class is partial, so you can create a new partial class.

public partial class MyClass
{
  bool Equals(object obj)
  {
    // code here
  }
}

Need Your Help

Why does IE7 require EOT fonts to include lowercase glyphs when we use text-transform: uppercase?

css internet-explorer-7 font-face eot

This week we stumbled upon a rather odd bug in IE7 (surprise, surprise) when embedding a EOT font file using the @font-face construct.