Exemplo n.º 1
0
 public void InsertCodeList(CodeList codeList)
 {
     if (codeList == null)
     {
         throw new ArgumentNullException("codeList");
     }
     _context.CodeLists.AddObject(codeList);
     _context.SaveChanges();
 }
Exemplo n.º 2
0
        public void UpdateCodeList(CodeList codeList)
        {
            if (codeList == null)
            {
                throw new ArgumentNullException("codeList");
            }
            if (!_context.IsAttached(codeList))
            {
                _context.CodeLists.Attach(codeList);
            }

            _context.SaveChanges();
        }