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 }); }
public dynamic PostYear(ManufacturingYearVM year) { db.ManufacturingYears.Add(new ManufacturingYear { Year = year.year }); var result = db.SaveChanges() > 0 ? true : false; return(new { result = result }); }