public async Task <IHttpActionResult> CreateLocation(LocationRequest request) { //convert from DTO Location dbObject = request.ToDB(); //add and save locationDB.Add(dbObject); await locationDB.Save(); return(CreatedAtRoute("DefaultApi", new { ID = dbObject.ID }, dbObject)); }