Inheritance: TableStorageEntity
 public AffilationEntity(AffilationEntity entity)
     : base(PARTITION_KEY, entity.RowKey)
 {
     AffilationId = entity.AffilationId;
     AffilationName = entity.AffilationName;
     WebsiteName = entity.WebsiteName;
     WebsiteLink = entity.WebsiteLink;
     LogoLink = entity.LogoLink;
     Country = entity.Country;
 }
 public AffilationEntity(AffilationEntity entity)
     : base(PARTITION_KEY, entity.RowKey)
 {
     AffilationId   = entity.AffilationId;
     AffilationName = entity.AffilationName;
     WebsiteName    = entity.WebsiteName;
     WebsiteLink    = entity.WebsiteLink;
     LogoLink       = entity.LogoLink;
     Country        = entity.Country;
 }
 public static AffilationEntity CreateAffilationEntity(string affilationName, string websiteName, string websiteLink, string logoLink, string country)
 {
     var affilationId = Guid.NewGuid().ToString();
     var entity = new AffilationEntity(affilationId);
     entity.AffilationId = affilationId;
     entity.AffilationName = affilationName;
     entity.WebsiteName = websiteName;
     entity.WebsiteLink = websiteLink;
     entity.LogoLink = logoLink;
     entity.Country = country;
     return entity;
 }
        public static AffilationEntity CreateAffilationEntity(string affilationName, string websiteName, string websiteLink, string logoLink, string country)
        {
            var affilationId = Guid.NewGuid().ToString();
            var entity       = new AffilationEntity(affilationId);

            entity.AffilationId   = affilationId;
            entity.AffilationName = affilationName;
            entity.WebsiteName    = websiteName;
            entity.WebsiteLink    = websiteLink;
            entity.LogoLink       = logoLink;
            entity.Country        = country;
            return(entity);
        }
Beispiel #5
0
        /// <summary>
        /// Update the affiliation by Affiliation id
        /// </summary>
        /// <param name="store"></param>
        /// <param name="affilation"></param>
        /// <returns></returns>
        public static bool UpdateAffilationById(this IStore store, AffilationEntity affilation)
        {
            Debug.Assert(affilation != null);
            var list = new List<AffilationEntity> { affilation };
            var retList = store.UpdateAffilationsById(list);

            Debug.Assert(retList.Count == 1);
            return retList[retList.Keys.FirstOrDefault()];
        }