Reputation: 1950
I have a class named AuditLog
inside Domain.AuditLog
namespace. I want to use AuditLog
class inside another class with namespace ApplicationServices.AuditLog
. like:
using Domain.AuditLog;
namespace ApplicationServices.AuditLog
{
public interface IAuditLogService
{
List<AuditLog> GetAuditLogs();
}
}
It says 'ApplicationServices.AuditLog' is a 'namespace' but is used like a 'type'. I know I can solve this using like:
namespace ApplicationServices.AuditLog
{
using Domain.AuditLog;
public interface IAuditLogService
{
List<AuditLog> GetAuditLogs();
}
}
Is there another way of referencing Domain.AuditLog
?
Upvotes: 0
Views: 222
Reputation: 1192
Maybe this could help you:
using AL = Domain.AuditLog.AuditLog;
namespace ApplicationServices.AuditLog
{
public interface IAuditLogService
{
List<AL> GetAuditLogs();
}
}
Upvotes: 1