|
public BatchDataResult GetData([FromBody] MyPostModel post)
{
var data = FilterAppointment(post.CurrentDate, post.CurrentAction, post.CurrentView);
BatchDataResult result = new BatchDataResult();
result.result = data;
result.count = _context.DefaultSchedule.ToList().Count > 0 ? _context.DefaultSchedule.ToList().Max(p => p.Id) : 1;
return result;
}
public class MyPostModel
{
public DateTime CurrentDate { get; set; }
public string CurrentView { get; set; }
public string CurrentAction { get; set; }
}
public class BatchDataResult
{
public Object result { get; set; }
public int count { get; set; }
} |