Advertisement
Guest User

Untitled

a guest
May 25th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. public static string GetIp()
  2. {
  3. return HttpContext.Connection.RemoteIpAddress.ToString();
  4. }
  5.  
  6.  
  7.  
  8. public class UserProfile : Profile
  9. {
  10. protected override void Configure()
  11. {
  12. CreateMap<SecurityUserModel, User>()
  13. .ForMember(d => d.EmailConfirmed, a => a.MapFrom(d => true))
  14. .ForMember(d => d.LockoutEnabled, a => a.MapFrom(d => false))
  15. .ForMember(d => d.CreatorIp, a => a.MapFrom(d => GetIp()));
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement