public List <Models.Tables.CarModel> GetCarModelsByMakeId(int id) { //Need to implement this. List <Models.Tables.CarModel> newModels = new List <Models.Tables.CarModel>(); using (_ctx = new GuildCarsEntities()) { try { var modelList = _ctx.GetCarModelsByMakeId(id); foreach (var mdl in modelList) { Models.Tables.CarModel model = new Models.Tables.CarModel(); model.CarModelId = mdl.CarModelId; model.ModelName = mdl.ModelName; newModels.Add(model); } } catch (Exception ex) { throw ex; } } return(newModels); }