When request by client app, Timeout occurs. I set breakpoints to check if the parameters were entered well in the controller method, and it looks fine.
Even after a while, an System.AccessViolationException occurs and my app crashes.
My Controller Code is here.
namespace REST_API_EX.Controllers
{
public class DeliveriesController : ApiController
{
private DatabaseContext db = new DatabaseContext();
[ResponseType(typeof(Delivery))]
public async Task<IHttpActionResult> GetDeliveryByOrder_No(string Order_No)
{
Delivery delivery = await db.Deliveries
.Where(d => d.Order_No == Order_No)
.FirstAsync();
if (delivery == null)
{
return NotFound();
}
return Ok(delivery);
}
}
}
Deliveryclass look like?