Implement service with explicit interface implementation I would like to implement service with explicit interface implementation.
I don't want to have public methods in service, only possible way to create instance is trough interface.

I am not sure what is best way to call method of same class if method is explicit implementation of interface method.

You can see in my code that I am using "AsIArchiveService" property.

I have public interface in class library:

using Common.Entities;
using System.Threading.Tasks;

namespace Common.Services
{
    public interface IArchiveService
    {
        Task&lt;ArchiveConfiguration&gt; GetConfiguration();

        Task&lt;bool&gt; Update(ArchiveConfiguration machine);
    }
}


Serivice class in main project:

using Common.Configurations;
using Common.Entities;
using Common.Services;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using RemoteManager.EntityFramework;
using System.IO;
using System.Linq;
using System.Threading.Tasks;

namespace Manager.Services
{
    internal class ArchiveService : IArchiveService
    {
        private readonly IOptions&lt;ApplicationConfiguration&gt; applicationConfiguration;
        private readonly ILogger&lt;ArchiveService&gt; logger;
        private readonly ManagerContext context;
        IArchiveService AsIArchiveService
        {
            get { return this; }
        }

        internal ArchiveService(ManagerContext context, IOptions&lt;ApplicationConfiguration&gt; applicationConfiguration, ILogger&lt;ArchiveService&gt; logger)
        {
            this.applicationConfiguration = applicationConfiguration;
            this.logger = logger;
            this.context = context;
        }

        async Task&lt;ArchiveConfiguration&gt; IArchiveService.GetConfiguration()
        {
            try
            {
                logger.LogInformation($"Start  {nameof(ArchiveService)}:{nameof(AsIArchiveService.GetConfiguration)}");
                if (this.context.ArchiveConfiguration.Count() == 0)
                {
                    var res = this.context.ArchiveConfiguration.Add(new ArchiveConfiguration() { isArchive = true, maxDataSetCount = 20, path = Path.Combine("C:/", "TestArchive") });
                    this.context.SaveChanges();
                }
                var result = this.context.ArchiveConfiguration.First();
                return await Task.FromResult(result);
            }
            catch
            {
                logger.LogError($"Error {nameof(ArchiveService)}:{nameof(AsIArchiveService.GetConfiguration)}");
                throw;
            }
        }

        async Task&lt;bool&gt; IArchiveService.Update(ArchiveConfiguration archive)
        {
            try
            {
                logger.LogInformation($"Start {nameof(ArchiveService)}:{nameof(AsIArchiveService.Update)}");
                this.context.Entry(archive).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
                this.context.SaveChanges();
                return await Task.FromResult(true);
            }
            catch
            {
                logger.LogError($"Error {nameof(ArchiveService)}:{nameof(AsIArchiveService.Update)}");
                throw;
            }
        }
    }
}
You're only using AsIArchiveService to statically get the name of the current method.  Instead, you could go off the interface directly, nameof(IArchiveService.GetConfiguration), which obviously returns the same value as going through AsIArchiveService.GetConfiguration.

logger.LogInformation($"Start  {nameof(ArchiveService)}:{nameof(IArchiveService.GetConfiguration)}");


If you changed your four usages in your log lines to go this route, you could dispense with the peculiar property you created altogether.