LInq to SQL - Partial Class - C#
Posted
by Mark Comix
on Stack Overflow
See other posts from Stack Overflow
or by Mark Comix
Published on 2010-03-12T16:01:47Z
Indexed on
2010/03/12
16:07 UTC
Read the original article
Hit count: 238
c#
|linq-to-sql
Hi, I have a system with 2 different projects, one is called LINQ_Extensions and the other is ORM_Linq.
On ORM_Linq i have the LINQ diagram with the SQL tables "converted" in clases. One of the Class is called "Tipos_Pago"
In the other project i have another class (partial class) "Tipos_Pago". I want to use the method OnValidate to validate the properties include in the class "Tipos_Pago", so i create this partial class.
In the 2 projects i put the same NameSpace "ORM_Linq"(I changed the NameSpace of the project "LINQ_Extensions" to have the same of the project "ORM_Linq")
After those chages, Visual Studio give me this error:
Error 1 No defining declaration found for implementing declaration of partial method 'ORM_Linq.Tipos_Pago.OnValidate(System.Data.Linq.ChangeAction)' C..\Tipos_Pago.cs 13 22 Extensiones_Linq
I don't have any Idea of what happend, can someone help me?
Thanks, sorry for my poor english
This is the code in the partial class:
namespace ORM_Linq
{
public partial class Tipos_Pago
{
partial void OnValidate(System.Data.Linq.ChangeAction action)
{
//Valid code
}
}
}
© Stack Overflow or respective owner