private MunicipalityController GetMunicipalityController() { _placesServiceMock = new Mock <IPlacesService>(); var municipalityCtrl = new MunicipalityController(_placesServiceMock.Object); return(municipalityCtrl); }
protected void dvDataSource_Inserting(object sender, ObjectDataSourceMethodEventArgs e) { Municipality m = e.InputParameters["entityToInsert"] as Municipality; MunicipalityController.ValidateInsertCode(m.Code); }
protected void dvDataSource_Updating(object sender, ObjectDataSourceMethodEventArgs e) { Municipality m = e.InputParameters["newEntity"] as Municipality; MunicipalityController.ValidateUpdateCode(m.ID, m.Code); }