コード例 #1
0
ファイル: UserTotal.cs プロジェクト: tarockx/CarPoolTool
        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
ファイル: UserTotal.cs プロジェクト: tarockx/CarPoolTool
 public UserTotal(User user, Total total)
 {
     Total = total;
     User  = user;
 }