How to assign a anonymous type to a model?Using ViewBag I could easily assign like that:\[code\]ViewBag.certType = comboType.ToList();\[/code\]I am removing all ViewBags from my system and now I am trying like that:\[code\]model.storeLocations = comboType.ToList();\[/code\]I am getting the following error:\[code\] Cannot implicitly convert type 'System.Collections.Generic.List<AnonymousType#1>' to 'int' S:\Projects\tgpwebged\tgpwebged\Controllers\AdminController.cs 376 40 tgpwebged\[/code\]Model:\[code\]public class TipoDocumentoModel { public sistema_DocType Type { get; set; } public IEnumerable<string> Indices { get; set; } public IEnumerable<string> NonAssoIndices { get; set; } public int storeLocations { get; set; } }\[/code\]controller:\[code\]public ActionResult AdminSettingAddTipo() { SettingsModels.TipoDocumentoModel model = new SettingsModels.TipoDocumentoModel(); //Pega os indices e locais de armazenamentos cadastrados no sistema using (tgpwebgedEntities context = new tgpwebgedEntities()) { var obj = from u in context.sistema_Indexes select u.idName; model.Indices = obj.ToList(); var comboType = from c in context.sistema_Armazenamento select new { id = c.id, local = c.caminhoRepositorio }; model.storeLocations = comboType.ToList(); } return PartialView(model); }\[/code\]