EntityFramework 4.0 - Validation DataAnnotations - ComplexObject

Jun 17, 2015 at 2:34 PM
Hi,
I am really struck up on implementing validations for the properties.
"MetadataType" doesn't work when I calls a stored procedure (ComplexObject)

//My partial class file to implement validation
internal interface IBook
{
[Required]
string BookName { get; set; }
}

[MetadataType(typeof(IBook))]
public partial class Book : IBook, IDataErrorInfo
{
.....
}

Book is ComplexObject. Not works!!!!

Please help me.
Thanks!!!