예제 #1
0
 void ICustodiansRepository.UpdateCustodian(Custodian custodian)
 {
     using (var dc = CreateContext())
     {
         var entity = GetCommunityAdministratorEntity(dc, custodian.Id);
         if (entity != null)
         {
             custodian.MapTo(entity);
             dc.SubmitChanges();
         }
     }
 }
예제 #2
0
        public static CommunityAdministratorEntity Map(this Custodian custodian)
        {
            var entity = new CommunityAdministratorEntity
            {
                id = custodian.Id,
                RegisteredUserEntity = new RegisteredUserEntity {
                    id = custodian.Id
                },
            };

            custodian.MapTo(entity);
            return(entity);
        }
예제 #3
0
 public static void MapTo(this Custodian custodian, CommunityAdministratorEntity entity)
 {
     custodian.MapTo(entity.RegisteredUserEntity);
     custodian.MapTo((IHaveEmailAddressEntity)entity.RegisteredUserEntity);
 }