I have the following in a using statement:
var result = await db.Database.SqlQuery<ModelLookup>("EXEC prGetModel", new {ManufacturerId = manufacturerId}).ToListAsync();
And a ModelLookup
class :
public class ModelLookup
{
public int ManufacturerId { get; set; }
public int ModelId { get; set; }
public string ModelDesc { get; set; }
}
Some of the DB columns have a different name.
Is there a quick way (or data annotation) that I can use to take a column from the database and map to the desired field?
(without having to add the procedure to a DbContext
)
Thanks,