views:

16

answers:

0

I'm trying to override the constructor of a partial class in RIA DomainService shared code as follows.

foo.shared.cs:

public partial class Foo
{
  private SomeClass _privatevariable;
  public Foo(SomeClass variable)
  {
      this._privatevariable= variable;
  }
}

foo is a generated class based on an Entity Framework Model.

When I build I get this error: 'Foo' does not contain a constructor that takes 0 arguments

coming from the EFModel.Designer.cs file.

How can I override the constructor without editing the generated code to do so?