<commit_before>using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using System.Web.Mvc;
using Signum.Utilities;
using Signum.Engine;
using Signum.Entities;
using Signum.Engine.Maps;
using Signum.Engine.DynamicQuery;
using Signum.Entities.Reflection;
using Signum.Entities.DynamicQuery;
using System.Reflection;
using System.Collections;
using System.Collections.Specialized;
using System.Web.Script.Serialization;
using System.Text;
using System.IO;
using Signum.Engine.Basics;
using System.Globalization;
using Signum.Utilities.Reflection;
using Signum.Web.Operations;
using Signum.Engine.Operations;

namespace Signum.Web.Controllers
{
    public class NavigatorController : Controller
    {
        [ValidateInput(false), ActionSplitter("webTypeName")]  //this is needed since a return content(View...) from an action that doesn't validate will throw here an exception. We suppose that validation has already been performed before getting here
        public new ViewResult View(string webTypeName, string id)
        {
            Type t = Navigator.ResolveType(webTypeName);

            Lite<Entity> lite = Lite.Create(t, PrimaryKey.Parse(id, t));

            using (Navigator.Manager.OnRetrievingForView(lite))
            {
                return Navigator.NormalPage(this, Database.Retrieve(lite));
            }
        }

        [ActionSplitter("webTypeName")]
        public ActionResult Create(string webTypeName)
        {
            Type type = Navigator.ResolveType(webTypeName);

            if (!type.IsEntity())
                throw new InvalidOperationException("Only classes that inherit from Entity can be created using this Action"); <commit_msg>fix NavigatorController View<commit_after>using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using System.Web.Mvc;
using Signum.Utilities;
using Signum.Engine;
using Signum.Entities;
using Signum.Engine.Maps;
using Signum.Engine.DynamicQuery;
using Signum.Entities.Reflection;
using Signum.Entities.DynamicQuery;
using System.Reflection;
using System.Collections;
using System.Collections.Specialized;
using System.Web.Script.Serialization;
using System.Text;
using System.IO;
using Signum.Engine.Basics;
using System.Globalization;
using Signum.Utilities.Reflection;
using Signum.Web.Operations;
using Signum.Engine.Operations;

namespace Signum.Web.Controllers
{
    public class NavigatorController : Controller
    {
        [ValidateInput(false), ActionSplitter("webTypeName")]  //this is needed since a return content(View...) from an action that doesn't validate will throw here an exception. We suppose that validation has already been performed before getting here
        public new ViewResult View(string webTypeName, string id)
        {
            Type t = Navigator.ResolveType(webTypeName);

            Lite<Entity> lite = Lite.Create(t, PrimaryKey.Parse(id, t));

            using (Navigator.Manager.OnRetrievingForView(lite))
            {
                return Navigator.NormalPage(this, Database.RetrieveAndForget(lite));
            }
        }

        [ActionSplitter("webTypeName")]
        public ActionResult Create(string webTypeName)
        {
            Type type = Navigator.ResolveType(webTypeName);

            if (!type.IsEntity())
                throw new InvalidOperationException("Only classes that inherit from Entity can be created using this Action"); 
{'fraction_non_alphanumeric': 0.08571428571428572, 'fraction_numerical': 0.0, 'mean_word_length': 3.5884665792922674, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5895301', 'n_tokens_mistral': 921, 'n_tokens_neox': 931, 'n_words': 260}