Static wcf client to make multiple request with one object I want to make a static client to call a wcf because the first time I call the wcf it takes too long, even sometimes it throws time out.

I have the following class:

public class Repository : IRepository
{
    protected static ServiceClient Client { get; set; }

    public Repository()
    {
        if (Client == null)
        {
            Client = new ServiceClient();
        }

        if (Client.ChannelFactory.State != CommunicationState.Opened 
            || Client.ChannelFactory.State != CommunicationState.Created)
        {
            Client = new ServiceClient();
        }
    }

    public virtual async Task&lt;Response&gt; GetPersonsFromAddress(string address)
    {
        try
        {
            Request request = new Request();
            request.Address = address;
            Response response = await Client.GetPersonsAsync(request);

            return response;
        }
        catch (Exception ex)
        {
            // ...
            // Handle exception
            // ...
        }
    }
}


And this class calls the method:

public class Conector : IConector
{
    private IRepository Repository { get; }

    public Conector()
    {
        Repository = new Repository();
    }

    public virtual async Task&lt;Response&gt; GetPersonsFromAddress(string address)
    {
        Response response = await Repository.GetPersonsFromAddress(address);
        return response;
    }
}


The object that calls the wcf service is static so I want to know if this is a good practice.

Also if there are a lot of people at the same time using this method, it will return the correct response for each request.
I think you should consider inverting control and moving ServiceClient instantiation outside the repository class. Whether or not ServiceClient is a singleton (in single-instance sense) or not is not something that repository should manage or care about:

public class Conector : IConector
{
    private IRepository Repository { get; }

    public Conector(IRepository repository)
    {
         Repository = repository;
    }
    ...
}

public class Repository : IRepository
{
    protected ServiceClient Client { get; }

    public Repository(ServiceClient client)
    {
        Client = client;
    }

    ...
}