using StubAP.Models;
using System.Web.Mvc;
using StubAP.ViewModels;
using StubCore.Entities;

namespace StubAP.Controllers
{
    public class ProfileController : FrontController
    {

        public ActionResult Add()
        {
            return View();
        }

        //[HttpPost]
        //public ActionResult Add()
        //{
        //    return View();
        //}




        //public class SlugToIdAttribute : ActionFilterAttribute
        //{

        //    public override void OnActionExecuting(ActionExecutingContext filterContext)
        //    {
        //        var slug = filterContext.RouteData.Values["slug"] as string;
        //        if (slug != null)
        //        {
        //            //my transformed url will always end in '-1234' so i split the param on '-' and get the last portion of it. That is my id. 
        //            //if an id is not supplied, meaning the param is not ending in a number i will just continue and let something else handle the error
        //            int id;
        //            Int32.TryParse(slug.Split('-').Last(), out id);
        //            if (id != 0)
        //            {
        //                //the controller expects an id and here we will provide it
        //                filterContext.ActionParameters["id"] = id;
        //            }
        //        }
        //        base.OnActionExecuting(filterContext);
        //    }
        //}
    }
}
