Exemplo n.º 1
0
        public void Insert(AddressDTO addressDTO)
        {
            var proto = _mapperAddress.DTOToProto(addressDTO);

            var address = new AddresPost
            {
                ZipCode      = addressDTO.ZipCode,
                PublicArea   = addressDTO.PublicArea,
                Neighborhood = addressDTO.Neighborhood,
                City         = addressDTO.City,
                State        = addressDTO.State,
            };

            _serviceGrpcAddress.Insert(address);
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="request"></param>
        /// <param name="context"></param>
        /// <returns></returns>
        public override Task <Empty> Insert(AddresPost request, ServerCallContext context)
        {
            var address = new domain.Entities.Address
            {
                ZipCode      = request.ZipCode,
                PublicArea   = request.PublicArea,
                Neighborhood = request.Neighborhood,
                City         = request.City,
                State        = request.State,
            };

            _repositoryAddress.Insert(address);

            return(Task.FromResult(new Empty()));
        }