public Shuttle Save(Shuttle model) { if (model.Id == Guid.Empty) { MemoryDb.Insert(model); return MemoryDb.SelectById(model.Id); } MemoryDb.Update(model); return MemoryDb.SelectById(model.Id); }
public RedirectToRouteResult Save(Shuttle model) { _shuttleRepository.Save(model); TempData["Message"] = "Successfully saved " + model.Name; return RedirectToAction("Index"); }
public static void Update(Shuttle model) { _wocketTable[model.Id] = model; }
public static void Insert(Shuttle model) { var id = Guid.NewGuid(); model.Id = id; _wocketTable.Add(id, model); }