entity framework - EF Code-First validation on Data Layer content -
i have 2 classes
public class student { int id {get;set}} string name {get;set;} } public class studentrequest { int requestid{get;set;} public string requesttype{get;set} public string status{get;set;} public datetime status{get;set;} }
i want validate student not have 2 requests 1 student in same status "opened" , field "status" have values "opened","closed". don't want use unique thing , want check database , validate entity using code-first concept
thank
Comments
Post a Comment