public static Boolean PersCrime(string surn, string name, string sdname, string Dbirth) { ListOfWorkersEntities bd1 = new ListOfWorkersEntities(); PoliceList per1 = new PoliceList(); IQueryable<PoliceList> custQueryS = from PoliceList in bd1.PoliceList where PoliceList.Surnume == surn & PoliceList.Name == name & PoliceList.SecondName == sdname & PoliceList.DateOfBirth == Dbirth select PoliceList; if (custQueryS.Count() == 0) { return false; } else { return true; } }
/// <summary> /// Create a new PoliceList object. /// </summary> /// <param name="personID">Initial value of the PersonID property.</param> /// <param name="surnume">Initial value of the Surnume property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="secondName">Initial value of the SecondName property.</param> /// <param name="dateOfBirth">Initial value of the DateOfBirth property.</param> /// <param name="crimeAction">Initial value of the CrimeAction property.</param> public static PoliceList CreatePoliceList(global::System.Int32 personID, global::System.String surnume, global::System.String name, global::System.String secondName, global::System.String dateOfBirth, global::System.String crimeAction) { PoliceList policeList = new PoliceList(); policeList.PersonID = personID; policeList.Surnume = surnume; policeList.Name = name; policeList.SecondName = secondName; policeList.DateOfBirth = dateOfBirth; policeList.CrimeAction = crimeAction; return policeList; }
/// <summary> /// Deprecated Method for adding a new object to the PoliceList EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPoliceList(PoliceList policeList) { base.AddObject("PoliceList", policeList); }