Exemplo n.º 1
0
        public Award Post(AwardInputModel obj)
        {
            Award award = new Award
            {
                AwardShowID = obj.AwardShowID,
                AwardTypeID = obj.AwardTypeID,
                MediaID     = obj.MediaID,
                Name        = obj.Name,
                Year        = obj.Year
            };

            return(_awardData.Add(award));
        }
Exemplo n.º 2
0
        public PlotKeywords Post(PlotInputModel obj)
        {
            PlotKeywords model = new PlotKeywords
            {
                KeywordName = obj.KeywordName
            };
            var returned = _plotData.Add(model);

            _context.SaveChanges();

            _context.MediaPlotKeywords.Add(new MediaPlotKeywords
            {
                KeywordID = returned.KeywordID,
                MediaID   = obj.MediaID
            });
            _context.SaveChanges();

            return(model);
        }
Exemplo n.º 3
0
 public People Add(People people)
 {
     return(_peopleData.Add(people));
 }