コード例 #1
0
 public CvViewModel GetCvViewModelForUser(ApplicationUser user)
 {
     var model = new CvViewModel {CurrentUser = user};
     if (!user.Cvs.Any())
     {
         user.Cvs.Add(new Cv());
     }
     return model;
 }
コード例 #2
0
        public CvViewModel GetCvViewModelForUser(ApplicationUser user)
        {
            if (!user.Cvs.Any())
            {
                CreateNewCv(user);
            }
            var model = new CvViewModel
            {
                CurrentUser = user,
                Cv = user.Cvs.FirstOrDefault()
            };

            return model;
        }