public Task CreateAsync(TUser user) { if (user == null) { throw new ArgumentNullException("user"); } TUser result = IdentityUserRepository.Add(user) as TUser; if (result != null) { return(Task.FromResult <TUser>(result)); } return(Task.FromResult <TUser>(null)); //return Task.FromResult<object>(null); }