public MapaController() { var unitOfWorkRepository = new NHUnitOfWorkRepository <Mapa>(); var unitOfWork = new NHUnitOfWork <Mapa>(unitOfWorkRepository); var mapaRepository = new MapaRepository(unitOfWork); this._mapaServices = new MapaServices(mapaRepository); var fileRepostory = new MapaFileRepository(); this._fileServices = new FileServices(fileRepostory); }
public void Init() { this._fileName = AppDomain.CurrentDomain.BaseDirectory + "\\TestMapa.txt"; //string codeBase = Assembly.GetExecutingAssembly().FullName; //UriBuilder uri = new UriBuilder(codeBase); //string filePath = Uri.UnescapeDataString(uri.Path); //this._fileName = codeBase; //filePath += "\\" + this._fileName; //Path.GetDirectoryName(path); var fileRepository = new MapaFileRepository(); var mapaRepository = new MapaRepository(new NHUnitOfWork <Mapa>(new NHUnitOfWorkRepository <Mapa>())); this._fileServices = new FileServices(fileRepository); }