コード例 #1
0
        public ActionResult Index()
        {
            var Publications = new List <PublicationVM>();

            foreach (Publication p in MyPublicationService.GetMany())
            {
                Publications.Add(new PublicationVM()
                {
                    title        = p.title,
                    description  = p.description,
                    creationDate = p.creationDate,
                    image        = p.image,
                    //OwnerId=p.OwnerId,
                    PublicationId = p.PublicationId,
                    visibility    = (VisibilityVM)p.visibility
                });
            }
            return(View(Publications));
        }