forked from sinanbozkus/FormHelper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAPI
More file actions
33 lines (29 loc) · 1.03 KB
/
API
File metadata and controls
33 lines (29 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[HTTPGET]
public JsonResult GetTempList()
{
List<TempViewModel> tempList = new List<TempViewModel>();
// API CALL
tempList = your return list from API CALL
return new JsonResult()
{
ContentEncoding = Encoding.Default,
ContentType = "application/json",
Data = tempList,
JsonRequestBehavior = JsonRequestBehavior.AllowGet,
MaxJsonLength = int.MaxValue
};
}
[HttpPost]
public async Task<JsonResult> EBizChargeAdvancedSearch(ViewModel modelVM)
{
// 1- Mapping of VM
// 2- Save Data
return new JsonResult()
{
ContentEncoding = Encoding.Default,
ContentType = "application/json",
Data = modelVM,
JsonRequestBehavior = JsonRequestBehavior.AllowGet,
MaxJsonLength = int.MaxValue
};
}