public async Task <int> InsertAsync(ManobraCarroDomain manobraCarro) { using (var con = _dbConnection.GetConnection) { DynamicParameters p = new DynamicParameters(); p.AddDynamicParams(new { idModeleCarro = manobraCarro.ModeloCarro.Id }); p.AddDynamicParams(new { placaCarro = manobraCarro.Placa }); p.AddDynamicParams(new { idPessoa = manobraCarro.Pessoa.Id }); return(await con.ExecuteAsync(insere, param : p, commandType : CommandType.StoredProcedure)); } }
public static ManobrarCarroModelView ManobraCarroDomainToManobraCarroModelView(ManobraCarroDomain manobraCarro) { return(new ManobrarCarroModelView() { Id = manobraCarro.Id, Data = manobraCarro.Data, Placa = manobraCarro.Placa, Pessoa = manobraCarro.Pessoa == null ? null : MapperPessoa.PessoaDomainToPessoaModelView(manobraCarro.Pessoa), ModeloCarro = manobraCarro.ModeloCarro == null ? null : MapperModeloCarro.ModeloCarroDomainToModeloCarroModelView(manobraCarro.ModeloCarro) }); }
public async Task <bool> UpdateAsync(ManobraCarroDomain manobraCarro) { return(await _manobraCarroRepository.UpdateAsync(manobraCarro)); }
public async Task <int> InsertAsync(ManobraCarroDomain manobraCarro) { return(await _manobraCarroRepository.InsertAsync(manobraCarro)); }