static void Main(string[] args) { var dbUserEntity = new DbUserEntity(); var dbUserInfoEntity = new DbUserInfoEntity(); var firstUserOrm = new ConcreteFirstOrm <DbUserEntity>(); var firstUserInfoOrm = new ConcreteFirstOrm <DbUserInfoEntity>(); var firstOrmAdapter = new FirstOrmAdapter(firstUserOrm, firstUserInfoOrm); var firstClient = new UserClient(firstOrmAdapter); firstClient.Add(dbUserEntity, dbUserInfoEntity); var secondOrm = new ConcreteSecondOrm(); var secondOrmAdapter = new SecondOrmAdapter(secondOrm); var secondClient = new UserClient(secondOrmAdapter); secondClient.Add(dbUserEntity, dbUserInfoEntity); }
public void Add(DbUserEntity user, DbUserInfoEntity userInfo) { _ormAdapter.Add(user, userInfo); }
public void Delete(DbUserInfoEntity entity) { Context.UserInfos.RemoveWhere(u => u.Id == entity.Id); }
public void Add(DbUserInfoEntity entity) { Context.UserInfos.Add(entity); }