|
@@ -25,28 +25,26 @@ namespace WebAPiUtils_test.DataAccess
|
25
|
25
|
};
|
26
|
26
|
}
|
27
|
27
|
|
28
|
|
- public override OpResult<T_SqlManager> DboAddToDb(ValuesDboAdd obj)
|
|
28
|
+ public override OpResult<bool> DboAddToDb(ValuesDboAdd obj, T_SqlManager add)
|
29
|
29
|
{
|
30
|
30
|
var res = GetSingleById(obj.TextId);
|
31
|
31
|
if (!res)
|
32
|
|
- return res.To<T_SqlManager>();
|
33
|
|
- return OpResult<T_SqlManager>.Ok(new T_SqlManager
|
34
|
|
- {
|
35
|
|
- my_string = obj.MyString,
|
36
|
|
- my_int = obj.MyInt,
|
37
|
|
- text = obj.TextId
|
38
|
|
- });
|
|
32
|
+ return res.To<bool>();
|
|
33
|
+ add.my_string = obj.MyString;
|
|
34
|
+ add.my_int = obj.MyInt;
|
|
35
|
+ add.text = obj.TextId;
|
|
36
|
+ return OpResult<bool>.Ok(true);
|
39
|
37
|
}
|
40
|
38
|
|
41
|
|
- public override OpResult<T_SqlManager> DboEditToDb(ValuesDboEdit obj, T_SqlManager edit)
|
|
39
|
+ public override OpResult<bool> DboEditToDb(ValuesDboEdit obj, T_SqlManager edit)
|
42
|
40
|
{
|
43
|
41
|
var res = GetSingleById(obj.TextId);
|
44
|
42
|
if (!res)
|
45
|
|
- return res.To<T_SqlManager>();
|
|
43
|
+ return res.To<bool>();
|
46
|
44
|
edit.my_string = obj.MyString;
|
47
|
45
|
edit.my_int = obj.MyInt;
|
48
|
46
|
edit.text = obj.TextId;
|
49
|
|
- return OpResult<T_SqlManager>.Ok(edit);
|
|
47
|
+ return OpResult<bool>.Ok(true);
|
50
|
48
|
}
|
51
|
49
|
|
52
|
50
|
public static OpResult<DboGetMultiple<ValuesDboGet>> Contains(string text, int page, int perPage)
|