I'm trying to get only 3 columns and it's returning me everything.
public JsonResults GetAll()
{
var q = _db.Cars;
return Json(new
{
data = q
.Select(x=> mew Cars()
{
CarMake = x.Make,
CarModel = x.Model
})
});
}It's returning me everything from the Cars Table, make, model, year, color, engine, etc. I only want Make and Model to be returned