質問編集履歴

4

修正

2022/01/11 04:50

投稿

NewNiche
NewNiche

スコア22

test CHANGED
File without changes
test CHANGED
@@ -48,7 +48,11 @@
48
48
 
49
49
  ● var GetEntities = context.table_B
50
50
 
51
+                 .Where(x => x.Year.Tostring() == ymd[0]
52
+
53
+ && x.Month.Tostring() == ymd[1]
54
+
51
-                 .Where(x => x.Year.Tostring() == yms[0] && x.Month.Tostring() == yms[1] && x.Day.Tostring() == yms[2]).ToList();
55
+ && x.Day.Tostring() == ymd[2]).ToList();
52
56
 
53
57
 
54
58
 

3

修正

2022/01/11 04:50

投稿

NewNiche
NewNiche

スコア22

test CHANGED
File without changes
test CHANGED
@@ -44,11 +44,19 @@
44
44
 
45
45
 
46
46
 
47
- //AEntityのデータと比較し、合致するものを取得
47
+ //AEntityのデータと比較し、table_Bと合致するものを取得
48
48
 
49
49
  ● var GetEntities = context.table_B
50
50
 
51
51
                  .Where(x => x.Year.Tostring() == yms[0] && x.Month.Tostring() == yms[1] && x.Day.Tostring() == yms[2]).ToList();
52
+
53
+
54
+
55
+
56
+
57
+ //number;string型
58
+
59
+ //Year month day;Deciaml型
52
60
 
53
61
  ```
54
62
 

2

修正

2022/01/11 04:47

投稿

NewNiche
NewNiche

スコア22

test CHANGED
File without changes
test CHANGED
@@ -42,19 +42,13 @@
42
42
 
43
43
  string[] ymd = trialList[0].Split(new char[] { '-', '_' })
44
44
 
45
-
46
-
47
-        //配列をInt型に変換
48
-
49
- int[] intymd = ymd.Select(int.Parse).ToArray();
50
-
51
45
 
52
46
 
53
47
  //AEntityのデータと比較し、合致するものを取得
54
48
 
55
49
  ● var GetEntities = context.table_B
56
50
 
57
-                 .Where(x => x.Year == intyms[0] && x.Month == intyms[1] && x.Day == intyms[2]).ToList();
51
+                 .Where(x => x.Year.Tostring() == yms[0] && x.Month.Tostring() == yms[1] && x.Day.Tostring() == yms[2]).ToList();
58
52
 
59
53
  ```
60
54
 

1

修正

2022/01/11 04:45

投稿

NewNiche
NewNiche

スコア22

test CHANGED
@@ -1 +1 @@
1
- C# LINQ to Entitiesでエラー
1
+ C# LINQ to Entitiesでエラー
test CHANGED
File without changes