public Task<HttpResponseMessage> CadastrarIgreja(Igreja model) { HttpResponseMessage response = new HttpResponseMessage(); try { var igreja = Mapper.Map<Igreja>(model); //igreja.Endereco.TipoEndereco = domain.Models.Enum.TipoEndereco.Igreja; _instituicaoService.CadastrarIgreja(igreja); } catch (Exception ex) { response = _responseMessage.CreateExceptionMessage(ex); } return _responseMessage.ApiResponse(response); }
public void CadastrarIgreja(Igreja igreja) { _instituicaoRepository.CadastrarIgreja(igreja); }
public void CadastrarIgreja(Igreja igreja) { _context.Igrejas.Add(igreja); _context.SaveChanges(); }