|
hey hi,
I ve been switching my model to EF 4.1 which auto-generates poco files..
I am really struck up on implementing validations for the properties.
"MetadataType" doesnt work in this case.. how the gosh it can be done ??
*********************************************************************************************************************************
Auto generated Poco File
-------------------------------
public partial class Book
{
public Book()
{
}
public string BookName { get; set; }
}
=======================================================
My partial class file to implement validation:
---------------------------------------------------
internal interface IBook
{
[Required]
string BookName { get; set; }
}
[MetadataType(typeof(IBook))]
public partial class Book : IBook, IDataErrorInfo
{
[...Implementation...]
}
Not works !! :(
*********************************************************************************************************************************
Please help me on this !!
Thanks..
|