It looks like StaffMemberViewModel is, in fact, a model? It is a model that your ViewModel is attempting to display. As for wiring it up, I'd do a little tidying and dependency injection, as well as create a Mapper Factory:
public class IndexViewModel : LayoutViewModel
{
public IndexViewModel(IEnumerable<StaffModel> staffModel)
{
_staffMembers = StaffModelMapperFactory.Map(staffModel);
}
private readonly List<PartialStaffViewModel> _staffMembers;
public List<PartialStaffViewModel> StaffMembers {get {return _staffMembers;}}
}
public class PartialStaffViewModel
{
public string FullName { get; set; }
public string CorporateTitle { get; set; }
}
public class StaffModelMapperFactory
{
public static List<PartialStaffViewModel> Map(IEnumerable<StaffModel> staff)
{
return staff.Select(member => new PartialStaffViewModel
{
FullName = string.Format("{0} {1} {2}", member.FirstName, member.MiddleInitial, member.LastName),
CorporateTitle = member.CorporateTitle
}).ToList();
}
}
[HttpGet]
public ActionResult Index()
{
var staffModel = new JsonFileService().ReadFileToModel<List<StaffModel>>(@"~/App_Data/Staff.json");
var model = new IndexViewModel(staffModel)
{
Title = "Future State Mobile"
};
return View(model);
}