Exemplo n.º 1
0
 // Providing Id explicitly allows to sync ID values with external entities - like loginId, userId, etc
 public static IParty NewParty(this IEntitySession session, PartyKind kind, string name, Guid? id = null)
 {
     var party = session.NewEntity<IParty>();
       party.Kind = kind;
       party.Name = name;
       if(id != null)
     party.Id = id.Value;
       return party;
 }
Exemplo n.º 2
0
        // Providing Id explicitly allows to sync ID values with external entities - like loginId, userId, etc
        public static IParty NewParty(this IEntitySession session, PartyKind kind, string name, Guid?id = null)
        {
            var party = session.NewEntity <IParty>();

            party.Kind = kind;
            party.Name = name;
            if (id != null)
            {
                party.Id = id.Value;
            }
            return(party);
        }