示例#1
0
        public static UserTotal Get(User user)
        {
            CarPoolToolEntities entities = new CarPoolToolEntities();

            var usertotals = from b in entities.Totals
                             where b.username == user.username
                             select b;
            Total total = usertotals.FirstOrDefault();

            return(new UserTotal(user, total));
        }
示例#2
0
        public static List <User> GetAll()
        {
            CarPoolToolEntities entities = new CarPoolToolEntities();

            return(entities.Users.ToList());
        }
示例#3
0
        public static User GetByUsername(string username)
        {
            CarPoolToolEntities entities = new CarPoolToolEntities();

            return((from u in entities.Users where u.username.Equals(username) select u).FirstOrDefault());
        }