Exception when invoking SendPropertyChanging in generated Linq2SQL Class RRS feed

  • Question

  • I currently encounter some strange behavior in one of my generated classes. I have a given database structure and from this I generated Linq entity classes. In only one of them every call to

            protected virtual void SendPropertyChanging()
                if ((this.PropertyChanging != null))
                    this.PropertyChanging(this, emptyChangingEventArgs);

    this.PropertyChanging results in an exception ArgumentException with the message

    GenericArguments[2], "System.String" in "System.Data.Linq.Mapping.PropertyAccessor+Accessor`3[T,V,V2]"  violates the constraint of type "V2"-parameter.

    Every other of the generated classes is working just fine. I already checked about everything from comparing the schema to the class, regenerating the code, searching the Internet... I just found no approach to this problem.

    Is there anybode out there who can help?



    Wednesday, August 11, 2010 12:46 PM

All replies

  • Hello,

    Can I ask which version of Visual Studio do you use? Please try to create a new project in Visual Studio 2010 and evaluate the issue, if it still occur, please post a code snippet to reproduce the issue.

    Thanks a lot!

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    Tuesday, August 17, 2010 9:31 AM