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: 
Create a `View Model` class:

```
public class ThreadViewModel
{
        public int id { get; set; }
        public int numberkeeper { get; set; }
}

```

Let Dapper know you want it to create the *ThreadViewModel* for you:

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

```

This way you both query the database for the relevant properties and return just them to the client (without Dapper creating the full object with *nulls*).
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.