Ejemplo n.º 1
0
 public static MemberVM FromMember(Member member) {
     if (member == null) { return null; }
     List<MemberEventScoreVM> mesList = new List<MemberEventScoreVM>();
     if (member.MemberEventScores != null) {
         mesList = (from mes in member.MemberEventScores
                    select MemberEventScoreVM.FromMemberEventScore(mes)).ToList();
     }
     return new MemberVM {
         Active = member.Active,
         CreatedAt = member.CreatedAt,
         Email = member.Email,
         FirstName = member.FirstName,
         Fodselsdato = member.Fodselsdato,
         Id = member.Id,
         Lastname = member.Lastname,
         LastUpdated = member.LastUpdated,
         MiddleName = member.MiddleName,
         Nickname = member.Nickname,
         Phone = member.Phone,
         SortOrder = member.SortOrder,
         MemberEventScores = mesList,
     };
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new Member object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="sortOrder">Initial value of the SortOrder property.</param>
 /// <param name="active">Initial value of the Active property.</param>
 /// <param name="createdAt">Initial value of the CreatedAt property.</param>
 public static Member CreateMember(global::System.Int64 id, global::System.Int32 sortOrder, global::System.Boolean active, global::System.DateTime createdAt)
 {
     Member member = new Member();
     member.Id = id;
     member.SortOrder = sortOrder;
     member.Active = active;
     member.CreatedAt = createdAt;
     return member;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Members EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMembers(Member member)
 {
     base.AddObject("Members", member);
 }