333
This commit is contained in:
parent
26b4012656
commit
96aee8c2b3
@ -197,21 +197,21 @@ namespace asg_form.Controllers
|
|||||||
query = query.Where(n => n.status == status);
|
query = query.Where(n => n.status == status);
|
||||||
}
|
}
|
||||||
|
|
||||||
var total = await query.CountAsync();
|
var TotalRecords = await query.CountAsync();
|
||||||
|
|
||||||
var rows = await query
|
var Tasks = await query
|
||||||
.OrderByDescending(a => a.status)
|
.OrderByDescending(a => a.status)
|
||||||
.Skip((page - 1) * limit)
|
.Skip((page - 1) * limit)
|
||||||
.Take(limit)
|
.Take(limit)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
var result = new
|
var result = new
|
||||||
{
|
{
|
||||||
TotalRecords = total,
|
rows = Tasks ,
|
||||||
Tasks = rows
|
total = TotalRecords
|
||||||
};
|
};
|
||||||
|
|
||||||
return Ok(result);
|
return (result,new code_st { message = null ,status = 200});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,13 @@ public class MyExceptionFilter : IAsyncExceptionFilter
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class code_st
|
||||||
|
{
|
||||||
|
|
||||||
|
public string message { get; set; }
|
||||||
|
|
||||||
|
public int status { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class error_mb
|
public class error_mb
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user