public IActionResult GetNote([FromRoute] int id) { var note = remarkService.GetNoteById(id); //var note = id == 1 ? // new Note { Id = 1, Body = "Note A", Location = GeometryPoint.Create(-122.12, 47.67), Owner = new UserInfo { Username = "******" } } : // new Note { Id = 2, Body = "Note B", Location = GeometryPoint.Create(-122.13, 47.68), Owner = new UserInfo { Username = "******" } }; return(Ok(new Model.Note( id: note.Id, body: note.Body, x: (note.Location as GeometryPoint).X, y: (note.Location as GeometryPoint).Y, owner: note.Owner ))); }