Esempio n. 1
0
 public void Add(Section entity)
 {
     CheckValidity(entity);
     db.Sections.Add(entity);
     Commit();
 }
Esempio n. 2
0
        public void Update(int id, Section entity)
        {
            CheckValidity(entity);

            var section = GetById(id);

            section.Name = entity.Name;
            section.Note = entity.Note;

            db.Sections.Update(section);
            Commit();
        }