Beispiel #1
0
        public JsonResult GetAllAttachmentForShow(int Value1)
        {
            var sa = new JsonSerializerSettings();
            IEnumerable <Attachment> AttachmentList = new List <Attachment>();

            var attachments = _repository.GetAllAttachmentForShow(Value1);

            if (attachments.Count > 0)
            {
                AttachmentList = attachments.Select(x =>
                                                    new Attachment()
                {
                    Id          = x.Id,
                    Description = x.Description,
                    PicUrl      = x.PicUrl
                });
            }
            return(Json(AttachmentList, sa));
        }