Exemple #1
0
        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();
            }
        }
Exemple #2
0
 public void Create(Panda p)
 {
     Add(p);
     SaveChanges();
 }