Beispiel #1
0
        public void Insert(Homes model)
        {
            if (!_ctx.home.Any())
            {
                _ctx.home.Add(model);
            }
            else
            {
                var home = _ctx.home.FirstOrDefault();

                home.headerTitolo      = model.headerTitolo;
                home.headerTesto       = model.headerTesto;
                home.headerImageId     = model.headerImageId;
                home.newsletterImageId = model.newsletterImageId;
            }
            _ctx.SaveChanges();
        }
Beispiel #2
0
 public void Insert(Categories model)
 {
     _ctx.category.Add(model);
     _ctx.SaveChanges();
 }
Beispiel #3
0
 public void Insert(Slugs slug)
 {
     _ctx.slug.Add(slug);
     _ctx.SaveChanges();
 }
Beispiel #4
0
 public void Insert(Reviews review)
 {
     _ctx.review.Add(review);
     _ctx.SaveChanges();
 }
Beispiel #5
0
 public void Insert(Podcasts model)
 {
     _ctx.podcast.Add(model);
     _ctx.SaveChanges();
 }
Beispiel #6
0
 public void Insert(Posts post)
 {
     _ctx.post.Add(post);
     _ctx.SaveChanges();
 }
Beispiel #7
0
 public void Insert(PhotoFolders model)
 {
     _ctx.photoFolder.Add(model);
     _ctx.SaveChanges();
 }
Beispiel #8
0
 public void Insert(Arguments argument)
 {
     _ctx.argument.Add(argument);
     _ctx.SaveChanges();
 }
Beispiel #9
0
 public void Insert(Administrators admin)
 {
     _ctx.administrator.Add(admin);
     _ctx.SaveChanges();
 }
Beispiel #10
0
 public void Insert(Videos model)
 {
     _ctx.video.Add(model);
     _ctx.SaveChanges();
 }
Beispiel #11
0
 public void Insert(Albums model)
 {
     _ctx.album.Add(model);
     _ctx.SaveChanges();
 }