小编Nim*_*ebi的帖子

ASP .NET Core:获取用户 IP 地址

我有一张桌子:有模型

public class ArticleLike:BaseEntity
{
    public long? UserId { get; set; }
    public string UserIp { get; set; }
    public ICollection<User> User { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

如何获取用户的IP地址?我必须在服务或存储库上编写它的方法吗?

database ip get ip-address asp.net-core

1
推荐指数
2
解决办法
2万
查看次数

标签 统计

asp.net-core ×1

database ×1

get ×1

ip ×1

ip-address ×1