public static List <PropertyDTO> Return_Details_user(string userNam, string Passwor) { using (ArgamanExpressEntities db = new ArgamanExpressEntities()) { int u = (from a in db.Users where userNam == a.UserName && Passwor == a.Password select a.UserID).FirstOrDefault(); return(RenterBL.getPropertiesbyRenterID(u)); } }
public static List <UserDTO> GetAllRenters() { using (ArgamanExpressEntities db = new ArgamanExpressEntities()) { List <User> renters = (from r in db.Users where r.status == true select r).ToList(); return(RenterBL.ConvertListToDTO(renters)); } }