diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
| commit | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch) | |
| tree | e1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Gestor.Application/Servicos/Seguros/ProfissaoServico.cs | |
| parent | 674ca83ba9243a9e95a7568c797668dab6aee26a (diff) | |
| download | gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip | |
chore: location
Diffstat (limited to 'Gestor.Application/Servicos/Seguros/ProfissaoServico.cs')
| -rw-r--r-- | Gestor.Application/Servicos/Seguros/ProfissaoServico.cs | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/Gestor.Application/Servicos/Seguros/ProfissaoServico.cs b/Gestor.Application/Servicos/Seguros/ProfissaoServico.cs deleted file mode 100644 index f528fcb..0000000 --- a/Gestor.Application/Servicos/Seguros/ProfissaoServico.cs +++ /dev/null @@ -1,78 +0,0 @@ -using Gestor.Application.Helpers;
-using Gestor.Application.Servicos.Generic;
-using Gestor.Infrastructure.Repository.Interface;
-using Gestor.Infrastructure.UnitOfWork.Generic;
-using Gestor.Infrastructure.UnitOfWork.Logic;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
-
-namespace Gestor.Application.Servicos.Seguros
-{
- internal class ProfissaoServico : BaseServico
- {
- public ProfissaoServico()
- {
- }
-
- public async Task<long> FindLastId()
- {
- int num1 = 3;
- long num2 = await Task.Run<long>(() => {
- long num;
- while (num1 > 0)
- {
- try
- {
- using (UnitOfWork read = Instancia.Read)
- {
- num = read.get_ProfissaoRepository().FindLastId();
- }
- }
- catch (Exception exception)
- {
- num1 = base.Registrar(exception, 17, num1, null, true);
- continue;
- }
- return num;
- }
- return (long)0;
- });
- return num2;
- }
-
- public async Task<Profissao> Save(Profissao profissao)
- {
- int num = 3;
- base.Sucesso = true;
- Profissao profissao1 = profissao;
- Profissao profissao2 = await Task.Run<Profissao>(() => {
- Profissao profissao3;
- while (num > 0)
- {
- profissao = profissao1;
- try
- {
- using (UnitOfWork commited = Instancia.Commited)
- {
- profissao = (profissao.get_Id() == (long)0 ? commited.get_ProfissaoRepository().SaveOrUpdate(profissao) : commited.get_ProfissaoRepository().Merge(profissao));
- commited.Commit();
- profissao3 = profissao;
- }
- }
- catch (Exception exception)
- {
- num = base.Registrar(exception, 214, num, profissao, true);
- continue;
- }
- return profissao3;
- }
- return profissao1;
- });
- return profissao2;
- }
- }
-}
\ No newline at end of file |