public IActionResult Post([FromBody] ViewModels.FBuser fbuser) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } ScoreValLogic.CerifyFB(fbuser); return(Ok()); }
public IActionResult Post([FromBody] ViewModels.ParticipantViewModel Participantvalues) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } CertifiedVals = ScoreValLogic.Certify(Participantvalues); GeoLocProps GetGeoLocation = getGeoLocations().Result; string Address = string.Format("{0} {1} {2}", Participantvalues.City, " , ", Participantvalues.State); MapPoint mapCords = latlangofAddr(Address, GetGeoLocation.Latitude, GetGeoLocation.Longitude); bool ZipCordsMatch = VerifyZipCords(GetGeoLocation.ZipCode, Participantvalues.Zip); scoremodel = CalculateScore.CalscoreVal(CertifiedVals, mapCords, ZipCordsMatch); UserAgent.UserAgent ua = BrowserLookup(); storetoDB(Participantvalues, scoremodel, GetGeoLocation, ua, mapCords); return(Ok()); }