Exemple #1
0
        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);
        }
Exemple #2
0
 public void Add(DbUserEntity user, DbUserInfoEntity userInfo)
 {
     _ormAdapter.Add(user, userInfo);
 }
Exemple #3
0
 public void Delete(DbUserEntity entity)
 {
     Context.Users.RemoveWhere(u => u.Id == entity.Id);
 }
Exemple #4
0
 public void Add(DbUserEntity entity)
 {
     Context.Users.Add(entity);
 }