public override bool IsValid(object value)
 {
     using (BoVoyageDbContext db = new BoVoyageDbContext())
     {
         return(!db.Clients.Any(x => x.Mail == value.ToString()));
     }
 }
示例#2
0
 public override bool IsValid(object value)
 {
     if (value != null && value is string)
     {
         using (BoVoyageDbContext db = new BoVoyageDbContext())
         {
             return(!db.Commercials.Any(x => x.Login == value.ToString()));
         }
     }
     return(true);
 }