Пример #1
0
        public void SaveUser(Usuario usuario)
        {
            var objectContext = new ObjectOnyxContext();

            objectContext.Usuarios.Add(usuario);
            objectContext.SaveChanges();
        }
Пример #2
0
        public void SaveCreate(CustomerSetting model)
        {
            var objectContext = new ObjectOnyxContext();

            objectContext.CustomerSettings.Add(model);
            objectContext.SaveChanges();
        }
Пример #3
0
        public void SaveEdit(CustomerSetting model)
        {
            var objectContext = new ObjectOnyxContext();
            var conv          = objectContext.CustomerSettings.Find(model.CustomerSettingID);

            conv.CustomerSettingID = model.CustomerSettingID;
            conv.KeyID             = model.KeyID;
            conv.Name  = model.Name;
            conv.Value = model.Value;
            objectContext.SaveChanges();
        }