public static void Register() { Container.GlobalContext.TransFactory = new TransManagerFactoryEF(new ModelCreator()); ModelToEntity.Install(); EntityToModel.Install(); DtoToEntity.Install(); }
public void CheckMappings() { ModelToEntity.Install(); EntityToModel.Install(); DtoToEntity.Install(); Mapper.AssertConfigurationIsValid(); }
public void listarRadiologia(string term) { this.listRadiologia = new List <UIAutocompleteModel>(); IAutocompleteService service = new AutompleteService(); var lst = service.listaRadiologia(term); this.listRadiologia = EntityToModel.listaAutocomplete(lst); }
public void listarLaboratorio(string term) { this.listLaboratorio = new List <UIAutocompleteModel>(); IAutocompleteService service = new AutompleteService(); var lst = service.listaLaboratorio(term); this.listLaboratorio = EntityToModel.listaAutocomplete(lst); }
public void listarDiagnostico(string term) { this.listDiagnostico = new List <UIAutocompleteModel>(); IAutocompleteService service = new AutompleteService(); var lst = service.listaDiagnostico(term); this.listDiagnostico = EntityToModel.listaAutocomplete(lst); }
public void getTeleconsulta(int id) { IFATService _service = new FATService(); var telec = _service.getTeleconsulta(id); this.teleconsulta = new TeleconsultaModel(); this.teleconsulta = EntityToModel.teleconsultaModel(telec); }
public Month GetByName(string monthName) { using (var context = new TimeSheetContext()) { var month = context.Months.FirstOrDefault(m => m.MonthName == monthName); if (month == null) { throw new KeyNotFoundException("No such month exists."); } return(EntityToModel.Map(month)); } }
public void Install() { EntityToModel.Install(); ModelToEntity.Install(); var factory = new TransManagerFactoryEF(ModelCreator); using (var transManager = factory.CreateManager()) { transManager.ExecuteCommand(locator => { var haulier = locator.FindAll <Haulier>().SingleOrDefault(h => h.Name == "BlueWhale"); if (haulier != null) { return(Mapper.Map <Haulier, HaulierModel>(haulier)); } haulier = Haulier.Create(locator, new HaulierModel { Name = "BlueWhale" }); return(Mapper.Map <Haulier, HaulierModel>(haulier)); }); } }