private SuburbEntity SelectSuburbById(int id) { try { using (var suburbs = new SuburbBusiness()) { return(suburbs.SelectSuburbById(id)); } } catch (Exception ex) { //Log exception error _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true); } return(null); }
private List <SuburbEntity> ListAllSuburbs() { try { using (var Suburbs = new SuburbBusiness()) { return(Suburbs.SelectAllSuburbs()); } } catch (Exception ex) { //Log exception error _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true); } return(null); }
private void UpdateSuburb(int SuburbId, string Suburbname) { try { using (var Suburbs = new SuburbBusiness()) { var entity = new SuburbEntity(); entity.SuburbId = SuburbId; entity.SuburbName = Suburbname; var opSuccessful = Suburbs.UpdateSuburb(entity); } } catch (Exception ex) { //Log exception error _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true); } }