Esempio n. 1
0
        public bool Delete(Person entity)
        {
            bool deleted        = false;
            var  persontodelete = _context.People.SingleOrDefault(a => a.CaseUserID == entity.CaseUserID);

            if (persontodelete != null)
            {
                _context.People.Remove(entity);
                int changes = _context.SaveChanges();
                deleted = (changes > 0);
            }
            else
            {
                deleted = false;
            }
            return(deleted);
        }
Esempio n. 2
0
 public void AddDirectoryEntry(Person person)
 {
     _context.People.Add(person);
     _context.SaveChanges();
 }