'Data.Repository.UnitofWork' 没有实现接口成员 'Data.Repository.IUnitofWork.Customer'

'Data.Repository.UnitofWork' does not implement interface member 'Data.Repository.IUnitofWork.Customer'

我有一个接口将另一个接口声明为 属性

namespace Data.Repository
{
    interface IUnitofWork : IDisposable
    {
        ICustomer Customer { get; }
        int Complete();

    }
}

我试图在 UnitofWork 中实现这个接口 class

namespace Data.Repository
{
    public class UnitofWork : IUnitofWork
    {
        private readonly NORTHWNDEntities _context;

        public UnitofWork(NORTHWNDEntities context)
        {
            _context = context;
            customer = new  CustomerRepository(_context);

        }

        public ICustomer customer { get; private set; }


        public int Complete()
        {
            return _context.SaveChanges();
        }

        public void Dispose()
        {
            _context.Dispose();
        }
    }
}

但是编译时显示错误 错误:'Data.Repository.UnitofWork' 没有实现接口成员 'Data.Repository.IUnitofWork.Customer'

请帮我解决这个错误 谢谢

区分大小写。这个,在你的 class:

public ICustomer customer { get; private set; }

需要

public ICustomer Customer { get; private set; }

(大写 C,因为这是您界面上的内容)