Esempio n. 1
0
        public dynamic PutYears(ManufacturingYearVM year)
        {
            var manufacturingYear = db.ManufacturingYears.Find(year.yearId);

            manufacturingYear.Year = year.year;
            var result = db.SaveChanges() > 0 ? true : false;

            return(new
            {
                result = result
            });
        }
Esempio n. 2
0
        public dynamic PostYear(ManufacturingYearVM year)
        {
            db.ManufacturingYears.Add(new ManufacturingYear
            {
                Year = year.year
            });
            var result = db.SaveChanges() > 0 ? true : false;

            return(new
            {
                result = result
            });
        }