示例#1
0
        public PictureDTO Get(string id)
        {
            var guid = Guid.Parse(id);

            var picture = pictureRepository.GetById(guid);

            return(PictureDTO.MapFromModel(picture));
        }
示例#2
0
        public void Insert(PictureDTO picture)
        {
            picture.Id = Guid.NewGuid();

            pictureRepository.Insert(PictureDTO.MapFromModel(picture));

            pictureRepository.SaveChanges();
        }