/// <summary>
        /// 新建
        /// </summary>
        public static GoodsInRotationImage New()
        {
            GoodsInRotationImage goodsInRotationImage = new GoodsInRotationImage();

            goodsInRotationImage.Id                 = 0;
            goodsInRotationImage.Goodsid            = 0;
            goodsInRotationImage.GoodsRotationImage = string.Empty;
            goodsInRotationImage.Number             = 0;
            return(goodsInRotationImage);
        }
        public bool AddGoodsInRotationImage(GoodsInRotationImage imgModel)
        {
            long id = 0;

            long.TryParse(goodsInRotationImageRepository.AddByCache(imgModel, true).ToString(), out id);
            bool result = id > 0 ? true : false;

            if (result)
            {
                goodsInRotationImageRepository.UpdateCacheByAddEntity(imgModel);
            }
            return(result);
        }
 /// <summary>
 /// 编辑实体
 /// </summary>
 /// <param name="rotationImg">实体</param>
 /// <returns></returns>
 public bool EditGoodsRotationImage(GoodsInRotationImage rotationImg)
 {
     return(goodsInRotationImageRepository.UpdateCacheByEntity(rotationImg));
 }
 /// <summary>
 /// 删除商品轮换图实体
 /// </summary>
 /// <param name="entity"></param>
 public bool DeleteGoodsRotationImage(GoodsInRotationImage entity)
 {
     return(goodsInRotationImageRepository.DeleteEntityByCache(entity));
 }