locked
Async RRS feed

  • Question

  • User1979860870 posted

    Hi

     How to change below code to Async

    public IHttpActionResult GetEmployees()
            {
    
                var results = (from d in db.Employees
                               join f in db.Departments
                               on d.DepartmentId equals f.ID
                               select new
                               {
                                   Id = d.ID,
                                   Name = d.Name,
                                   Department = f.Description
                               }).ToList();
                return Ok(results);
            }

    Thanks

    Friday, February 19, 2021 5:04 AM

All replies

  • User1312693872 posted

    Hi,jagjit saini

    You can try this:

    public async Task<IHttpActionResult> GetEmployees()
            {
            }

    Best Regards,

    Jerry Cai

    Friday, February 19, 2021 8:55 AM