I have this Api
[HttpPost]
public IHttpActionResult Register(string Username, string Password, string Type, string Email, string Phone)
{
User user = new User();
user.Username = Username;
user.Password = Password;
user.Type = Type;
user.Email = Email;
user.Phone = Phone;
return Ok(IUserRepo.Register(user));
}
I tried using this
public IHttpActionResult Register([FromUri] User) < - but it gives null in the User object this way.
{
return Ok(IUserRepo.Register(User));
}