// Business Logic pass through code to Insert Session public bool InsertSession(SessionsEntity entity) { try { bool bOpDoneSuccessfully; using (var repository = new SessionsRepository()) { bOpDoneSuccessfully = repository.Insert(entity); } return(bOpDoneSuccessfully); } catch (Exception ex) { //Log exception error _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true); throw new Exception("BusinessLogic:SessionsBusiness::InsertSession::Error occured.", ex); } }