public bool InsertPerson(Persons entity) { try { bool isSuccess; using (var repo = new PersonsRepository()) { isSuccess = repo.Insert(entity); } return(isSuccess); } catch (Exception ex) { LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true); throw new Exception("BusinessLogic:PersonsBusiness::InsertPerson::Error occured.", ex); } }
public bool InsertPerson(PersonsEntity entity) { try { bool bOpDoneSuccessfully; using (var repository = new PersonsRepository()) { bOpDoneSuccessfully = repository.Insert(entity); } return(bOpDoneSuccessfully); } catch (Exception ex) { //Log exception error _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true); throw new Exception("BusinessLogic:PersonsBusiness::InsertPerson::Error occured.", ex); } }
public bool Insert(Persons person) { return(ipersonsRepository.Insert(person)); }