public ActionResult Create(int?id) { if (id != null) { var Varial = _userRegistrationBs.GetById(Convert.ToInt32(id)); return(View(Varial)); } else { _userModel.UserLists = _userRegistrationBs.UserRegistrationList().ToList(); return(View(_userModel)); } }
public IHttpActionResult UserProfile(int id) { var res = _userRegistrationBs.GetById(id); if (res != null) { apiResponse.Data = res; apiResponse.IsSuccess = true; apiResponse.Message = "Data Found"; return(Ok(apiResponse)); } else { apiResponse.IsSuccess = false; apiResponse.Message = "No Record Found"; return(Ok("No Record Found")); } }