Question: Both of the server and client have the code

```
 setInterval(function(){ 
    player.x++;
    player.y++;
}, 20);

```

I have a node.js / socket.io server where the player's x and y are being updated every frame and sent to the client. The client is also having a different x and y being updated using the same logic. The client seems to be moving faster than the server though so it's making the game not in sync.. What should I be doing differently?

Answer: 
If you create a new model that exposes the only two members that you want to render, that will prevent Web API from returning back additional JSON.

You could also convert the data after loading it into a new anonymous model using LINQ.

```
return Ok(statevi.Select(s => new { s.id, s.numberkeeper }));

```

If you want to keep the same model, but suppress null valued members Web API allows you to configure the JSON formatting to exclude null properties.

```
config.Formatters.JsonFormatter.SerializerSettings = new JsonSerializerSettings
{
    NullValueHandling = NullValueHandling.Ignore
};

```
If you want to use 2 or selected rows from query then you can use query method and extension method...
1. LINQ query method

```
 using (System.Data.SqlClient.SqlConnection sqlConnection = new System.Data.SqlClient.SqlConnection(Connectionstring))
            {

                sqlConnection.Open();
                var statevi = sqlConnection.Query<thread>("Select top 5 id,numberkeeper from threads").ToList();

                if (statevi == null)
                {
                    return NotFound();
                }

                var result = (from d in statevi
                              select new { d.id, d.numberkeeper }).ToList();

                return Ok(result);

            }

```

2. Extension Method: change this syntax to result of query method of above

```
var result = query.Select(d => new { d.Id, d.Title }).ToList();

```

both will give result same.
let me tell if it is working fine for your project or not.