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"); } }
public DishRepository(IDishContext dishContext, IDishMapper mapper) { db = dishContext; }
public DishRepository(IDishContext context) { _context = context; }