Example #1
0
        public bool DeShigongImages(Guid id)
        {
            ShigongImages pt = c.ShigongImages.FirstOrDefault(n => n.Id == id);

            c.ShigongImages.Remove(pt);
            c.SaveChanges();
            return(true);
        }
Example #2
0
        public bool AddShigongImages(ShigongImagesModel model)
        {
            model.Id = Guid.NewGuid();
            ShigongImages pt = GetMapperDTO.SetModel <ShigongImages, ShigongImagesModel>(model);

            c.ShigongImages.Add(pt);
            c.SaveChanges();
            return(true);
        }