コード例 #1
0
ファイル: MemberModels.cs プロジェクト: jonantoine/gcr
 public static GCR.Core.Entities.Member ToModel(MemberViewModel model, GCR.Core.Entities.Member member = null)
 {
     if (member == null)
     {
         member = new GCR.Core.Entities.Member();
     }
     member.FirstName   = model.FirstName;
     member.LastName    = model.LastName;
     member.MemberSince = model.MemberSince;
     member.IsActive    = model.IsActive;
     member.Bio         = model.Bio;
     member.Photo       = model.Photo;
     return(member);
 }
コード例 #2
0
ファイル: MemberModels.cs プロジェクト: jonantoine/gcr
 public static MemberViewModel ToViewModel(GCR.Core.Entities.Member member, MemberViewModel model = null)
 {
     if (model == null)
     {
         model = new MemberViewModel();
     }
     model.FirstName   = member.FirstName;
     model.LastName    = member.LastName;
     model.MemberSince = member.MemberSince;
     model.IsActive    = member.IsActive;
     model.Bio         = member.Bio;
     model.Photo       = member.Photo;
     return(model);
 }