public void Update(Panda p) { Panda result = GetPandaById(p.PandaId); if (result != null) { result.Type = p.Type; result.Location = p.Location; result.Cuteness = p.Cuteness; result.Weight = p.Weight; result.Description = p.Description; result.Updated_At = DateTime.Now; SaveChanges(); } }
public void Create(Panda p) { Add(p); SaveChanges(); }