Beispiel #1
0
        public DishRepository(StorageTypeSetting.StorageTypes storageType)
        {
            switch (storageType)
            {
            case StorageTypeSetting.StorageTypes.SQL:
                _context = new DishContextSQL();
                break;

            case StorageTypeSetting.StorageTypes.Memory:
                _context = new DishContectMemory();
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(storageType), storageType, "Set Storage Type");
            }
        }
Beispiel #2
0
 public DishRepository(IDishContext dishContext, IDishMapper mapper)
 {
     db = dishContext;
 }
Beispiel #3
0
 public DishRepository(IDishContext context)
 {
     _context = context;
 }