public CvViewModel GetCvViewModelForUser(ApplicationUser user) { var model = new CvViewModel {CurrentUser = user}; if (!user.Cvs.Any()) { user.Cvs.Add(new Cv()); } return model; }
public CvViewModel GetCvViewModelForUser(ApplicationUser user) { if (!user.Cvs.Any()) { CreateNewCv(user); } var model = new CvViewModel { CurrentUser = user, Cv = user.Cvs.FirstOrDefault() }; return model; }