public void Remove(int userId) { var user = userOrm.Read(userId); userOrm.Delete(user); userInfoOrm.Delete(userInfoOrm.Read(user.InfoId)); }
public void Delete(IFirstOrm <IDbEntity> first) { if (typeof(Type) == typeof(DbUserEntity)) { first.Delete(new DbUserEntity()); } else if (typeof(Type) == typeof(DbUserInfoEntity)) { first.Delete(new DbUserInfoEntity()); } else { throw new NotImplementedException("Не тип БД"); } }
public void RemoveUserInfo(int userId) { var user = _firstOrm1.Read(userId); var userInfo = _firstOrm2.Read(user.InfoId); _firstOrm2.Delete(userInfo); }
public void Remove(int userId) { var user = firstOrm1.Read(userId); var userInfo = firstOrm2.Read(user.InfoId); firstOrm2.Delete(userInfo); firstOrm1.Delete(user); }
public void Delete(int userId) { var user = _userOrm.Read(userId); var userInfo = _userInfoOrm.Read(user.InfoId); _userInfoOrm.Delete(userInfo); _userOrm.Delete(user); }
public void Remove(int userId) { var user = firstOrmWithDbUserEntity.Read(userId); var userInfo = firstOrmWithDbUserInfoEntity.Read(user.InfoId); firstOrmWithDbUserInfoEntity.Delete(userInfo); firstOrmWithDbUserEntity.Delete(user); }
public void Remove(int userId) { var user = _users.Read(userId); var userInfo = _userInfos.Read(user.InfoId); _userInfos.Delete(userInfo); _users.Delete(user); }
public void Remove(int userId) { var user = _firstOrmBdEntuty.Read(userId); var userInfo = _firstOrmBdInfoEnity.Read(user.InfoId); _firstOrmBdInfoEnity.Delete(userInfo); _firstOrmBdEntuty.Delete(user); }
public void Remove(int userId) { var user = usersOrm.Read(userId); var userInfo = userInfosOrm.Read(user.InfoId); userInfosOrm.Delete(userInfo); usersOrm.Delete(user); }
public void DeleteUser(int userId) { var user = _firstUserOrm.Read(userId); var userInfo = _firstUserInfoOrm.Read(user.UserInfoId); _firstUserInfoOrm.Delete(userInfo); _firstUserOrm.Delete(user); }
public void Remove(int id) { var user = _firstOrm1.Read(id); var userInfo = _firstOrm2.Read(id); _firstOrm1.Delete(user); _firstOrm2.Delete(userInfo); }
public void RemoveUserById(int userId) { var user = GetUserBy(userId); var userInfo = GetUserInfoBy(user.InfoId); _firstOrm1.Delete(user); _firstOrm2.Delete(userInfo); }
public void Remove(int userId) { if (_useFirstOrm) { var user = _firstOrm1.Read(userId); var userInfo = _firstOrm2.Read(user.InfoId); _firstOrm2.Delete(userInfo); _firstOrm1.Delete(user); } else { // add realization by yourself var user = _secondOrm.Context.Users.First(i => i.Id == userId); var userInfo = _secondOrm.Context.UserInfos.First(i => i.Id == user.InfoId); _secondOrm.Context.Users.Remove(user); _secondOrm.Context.UserInfos.Remove(userInfo); } // you should remove DbUserEntity and DbUserInfoEntity via _ormAdapter _ormAdapter.Remove(userId); }
public void RemoveUserInfo(int userId) => _dbUserInfoEntity.Delete(GetUserInfo(userId));
public void Delete(DbUserEntity user, DbUserInfoEntity info) { _usersDb.Delete(user); _usersInfosDb.Delete(info); }
public void RemoveUser(int userId) { var user = _firstOrm1.Read(userId); _firstOrm1.Delete(user); }
public void Remove(int userId) { var(user, userInfo) = this.Get(userId); FirstOrmUser.Delete(user); FirstOrmUserInfo.Delete(userInfo); }
public void DeleteUserInfo(DbUserInfoEntity dbUserInfoEntity) { _iFirstOrmDbUserInfoEntity.Delete(dbUserInfoEntity); }
public void RemoveUserAndInfo(int userId) { _dbUserEntity.Delete(GetUser(userId)); _dbUserInfoEntity.Delete(GetUserInfo(userId)); }
public void RemoveDbUserInfoEntity(int userId) { dbUserInfo.Delete(GetDbUserInfoEntity(userId)); }