Пример #1
0
        public void Delete(User user, OperationInfo opInfo)
        {
            using (DataModelProvider <UserDataModel> dataModelProvider = this.DataModelProviderFactory.CreateDataProvider <UserDataModel>())
            {
                UserDataModel model = dataModelProvider.SelectById(user.Id);
                dataModelProvider.Update(model);

                this.UserEvents.OnDeleted(user, opInfo);
            }
        }
Пример #2
0
        public void Change(UserChangeInfo changeInfo)
        {
            this.UserEvents.OnChanging(changeInfo);

            using (DataModelProvider <UserDataModel> dataModelProvider = this.DataModelProviderFactory.CreateDataProvider <UserDataModel>())
            {
                UserDataModel model = dataModelProvider.SelectById(changeInfo.ChangeUser.Id);
                this.MapperFactory.Map <UserDataModel, UserChangeInfo>(model, changeInfo);
                dataModelProvider.Update(model);

                this.UserEvents.OnChanged(changeInfo);
            }
        }