Ejemplo n.º 1
0
        public Ads_Object GetElementById(Guid AdsId)
        {
            var objData = mdbContext.WEB_CARONLINE_SP_Ads_GetByID(AdsId);
            List <Ads_Object> lisAdsObject = new List <Ads_Object>();

            foreach (var obj in objData)
            {
                Ads_Object objAds = new Ads_Object();
                objAds.AdsID     = obj.AdsID;
                objAds.Icon      = obj.Icon;
                objAds.Tittle    = obj.Tittle;
                objAds.Image     = obj.Image;
                objAds.Rank      = obj.Rank;
                objAds.Content   = obj.Content;
                objAds.Position  = obj.Position;
                objAds.Status    = obj.Status;
                objAds.IsDeleted = obj.IsDeleted;
                objAds.Link      = obj.Link;
                objAds.ImageFlag = (bool)obj.ImageFlag;
                return(objAds);
            }
            return(null);
        }