public api.getdelays.POCO.User DeleteFollowStation(string userid, string station) { IFollowedStation followedStation = new DALFollowedStation(); IUser userDAL = new DALUser(); api.getdelays.POCO.User u = userDAL.GetUser(Convert.ToInt32(userid)); if (u != null) { api.getdelays.POCO.FollowedStation f = followedStation.GetFollowedStation(station, u); followedStation.DeleteFollowedStation(f); u.followedStations = followedStation.GetFollowedStations(); return(u); } else { return(null); } }
public api.getdelays.POCO.User FollowStation(string station, string userid) { IFollowedStation followedStation = new DALFollowedStation(); IUser userDAL = new DALUser(); api.getdelays.POCO.User u = userDAL.GetUser(Convert.ToInt32(userid)); if (u != null) { followedStation.AddFollowedStation(new api.getdelays.POCO.FollowedStation { stationName = station, user = u }); u.followedStations = followedStation.GetFollowedStations(); return(u); } else { return(null); } }