You need to have a return statement since the current code never returns anything. Try return Ok(result); or if there truly are no results return NotFound(); and if that is the case you need to set a breakpoint, examine IL.UserId.
missing logic to the LINQ query which does not work
public IHttpActionResult InsuranceLimit(InsuranceLimitDTO IL)
{
var result = from b in db.InsuranceTransferAcc
where b.UserId == IL.UserId
select b.CreatedDate;
}
This above query (result ) is returning me empty. Not understanding what I am missing in this query. It should return me the CreatedDate coloumn value for that UserId passed.
InsuranceTransferAcc is actual sql table where multiple columns (fields) are present. InsuranceLimitDTO is my schema where my input parameters are cOming from a POST API call.... I am trying to first check the passed input parameter value (IL.UserId) from the table InsuranceTransferAcc matches (b.UserId)...if so I need that related CreatedDate value in output (b.CreatedDate ). Hope my question makes sense