public async Task <IHttpActionResult> CheckUNValidity(int UserId, string UserName) { repository = new HomeRepository(); var result = await repository.CheckUNValidity(UserId, UserName); return(Content(HttpStatusCode.OK, result, Configuration.Formatters.JsonFormatter)); }