5
I’m trying to see the Sqls run by Entity Framework, use version 6.
I’m following this guide.
I made a new Dbcontext using the graphical interface. 5 tables only.
The code is inside an API2 Web Controller:
public class TAGsController : ApiController
{
    private MEUDB db = new MEUDB();
    // GET: api/TAGs/5
    [Route("{Key}/api/tag/tag/{id}")]
    [ResponseType(typeof(TAG))]
    public async Task<IHttpActionResult> GetTAG(long id)
    {
        db.Database.Log = Console.Write;
        TAG tAG = await db.TAGs.FindAsync(id);
        if (tAG == null)
        {
            return NotFound();
        }
        return Ok(tAG);
    }
}
When debugging I went to the Find line and it returned the following in the output window:
The thread 0x8188 has exited with code 259 (0x103).
What am I doing wrong? According to the guide should just be this.
Edited: More information
By doing everything the same, only by using the Find(), without the Async(), it works. 
TAG tAG = await db.TAGs.Find(id);
Is there any extra setting for this? Or some special care?
Dude, see if this [link][1] helps you. 
 
 
 [1]: http://stackoverflow.com/questions/18887864/what-is-a-thread-exit-code
– pnet
It talks about the debug, even without the debug it continues without logging in. It has to do with Async, using Find without async it works.
– Ricardo