Getting Error while creating shared.cs file?


hello everyone,

i m using code first existing database approach in app.

i have created prodataclass :dbcontext .

i want check existing records using custom validation.

i have writtten custon classand added following method

readonly static prodataclass datacontext = new prodataclass();          public static validationresult validateduplicatecirclecode(string validatecirlecode, validationcontext context)         {              circle currentcircle = context.objectinstance circle;             if (currentcircle == null) return validationresult.success;             circle matchingcircle=null;             if ((matchingcircle = (from t in datacontext.circles t.circlecode== currentcircle.circlecode select t).firstordefault()) != null)             {                 return new validationresult(errorresources.cannotinsertduplicatecirclecode, new string[] { "circlecode" });             }             else             {                 return validationresult.success;             }         }


when iam building client project giving error , cannot find prodataclass?

any appreciated?

is definition of prodataclass in same assembly code?  if not need add reference it.

what namespace prodataclass in?  need using statement @ top of code make namespace visible.



Silverlight  >  Silverlight 5



Comments

Popular posts from this blog

more indexes

ActiveDirectory

Virtual Channel