public async Task <ActionResult> OnPostDeleteRideAsync(string Driver, string Seats, string Date, string Time, string DeparturePoint, string DestinationCity, string DestinationAddr, string Comment) { Ride ride = new Ride(); ride.Driver = Driver; ride.Seats = int.Parse(Seats); ride.Date = Date; ride.Time = Time; ride.DeparturePoint = DeparturePoint; ride.DestinationCity = DestinationCity; ride.DestinationAddr = DestinationAddr; ride.Comment = Comment; try{ client = new ClientSocket(); string asnwer = client.DeleteRide(ride); if (asnwer == "ok") { Message = "Ride deleted succesfully"; } else { Message = "Something went wrong, please try again."; } } catch (Exception e) { } return(Redirect("Account")); }