public void AddEmail(ref OperationResult pobjOperationResult, emailDto pobjDtoEntity) { //mon.IsActive = true; int SecuentialId = 0; try { SigesoftEntitiesModel dbContext = new SigesoftEntitiesModel(); email objEntity = emailAssembler.ToEntity(pobjDtoEntity); SecuentialId = Utils.GetNextSecuentialId(1, 400); objEntity.i_EmailId = SecuentialId; dbContext.AddToemail(objEntity); dbContext.SaveChanges(); pobjOperationResult.Success = 1; return; } catch (Exception ex) { pobjOperationResult.Success = 0; pobjOperationResult.ExceptionMessage = Common.Utils.ExceptionFormatter(ex); return; } }