コード例 #1
0
        //add user

        public static void addUser(UsersEntities user, Car_DetailsEntities car)

        {
            if (user != null)

            {
                Users newUser = UsersEntities.convertUserEntitiesToUserTbl(user);
                // Car_Details newCar = Car_DetailsEntities.convertCarDetailsEntitiestoCarDetailsTbl(car);
                DB.Users.Add(newUser);
                // DB.Car_Details.Add(newCar);
            }
        }
コード例 #2
0
        //function that check if user is exists

        public static Boolean ExistUser(UsersEntities user)

        {
            Users u = UsersEntities.convertUserEntitiesToUserTbl(user);

            if (DB.Users.Any(x => x.Mail == u.Mail)) //when exists user

            {
                return(false);
            }

            return(true);
        }