public UserController() { _userContext = new UserContext(); _userLocations = new UserLocationsContext(); _relationshipContext = new RelationshipContext(); webservice = new _3FWebService(); }
//Share user location public ActionResult ShareUserLocation(string userId, double longtitude, double lattitude) { if (userId == null) { return(View()); } UserLocations userLocations = UserLocationsContext.GetLocation(userId); if (userLocations == null) { List <Location> locations = new List <Location>(); locations.Add(new Location(longtitude, lattitude)); userLocations = new UserLocations(ObjectId.Parse(userId), locations); } userLocations.locations.Add(new Location(longtitude, lattitude)); return(View()); }
public UserLocationController() { _userLocationContext = new UserLocationsContext(); }