Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class ThingController
- Inherits System.Web.Mvc.Controller
- Function Details(ByVal id As String) As ActionResult
- Dim RedirectId As Guid
- Select Case key
- Case "legacyurlone"
- RedirectId = New Guid("c564c0c1-c365-4b0c-bc33-fd4eadf0551b")
- Case "legacyurltwo"
- RedirectId = New Guid("157fa15b-8d5d-4f04-87cc-434f7ae93dfa")
- Case Else
- RedirectId = Guid.Empty
- End Select
- If Not RedirectId = Guid.Empty Then
- Response.StatusCode = Net.HttpStatusCode.MovedPermanently
- Response.RedirectLocation = Url.RouteUrl("IdOnly", New With {.id = RedirectId})
- Return Nothing
- End If
- Dim ThingId As Guid = New Guid(id)
- Dim db As New ThingEntities
- Dim Model As Thing = ...
- Return View(Model)
- End Function
- ...
- End Class
Add Comment
Please, Sign In to add comment