mirror of https://github.com/abpframework/abp.git
2 changed files with 0 additions and 38 deletions
@ -1,27 +0,0 @@ |
|||||
using System; |
|
||||
using Volo.Abp.Guids; |
|
||||
using Volo.DependencyInjection; |
|
||||
|
|
||||
namespace Volo.Abp.Domain.Entities |
|
||||
{ |
|
||||
//TODO: No need! Directly use Guid Generator!
|
|
||||
public class DefaultIdGenerator : IIdGenerator, ITransientDependency |
|
||||
{ |
|
||||
private readonly IGuidGenerator _guidGenerator; |
|
||||
|
|
||||
public DefaultIdGenerator(IGuidGenerator guidGenerator) |
|
||||
{ |
|
||||
_guidGenerator = guidGenerator; |
|
||||
} |
|
||||
|
|
||||
public string GenerateStringId() |
|
||||
{ |
|
||||
return GenerateGuid().ToString(); |
|
||||
} |
|
||||
|
|
||||
public Guid GenerateGuid() |
|
||||
{ |
|
||||
return _guidGenerator.Create(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,11 +0,0 @@ |
|||||
using System; |
|
||||
|
|
||||
namespace Volo.Abp.Domain.Entities |
|
||||
{ |
|
||||
public interface IIdGenerator |
|
||||
{ |
|
||||
string GenerateStringId(); |
|
||||
|
|
||||
Guid GenerateGuid(); |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue