T4MVC : یکی از الزامات مدیریت پروژههای ASP.NET MVC
نویسنده: وحید نصیری
تاریخ: ۱۳۹۱/۰۴/۱۱ ۹:۴۵
آدرس: www.dntips.ir
| مطالب | ۳۶۹۴ |
| نویسندگان | ۲۷۶ |
| گروههای مطالب | ۱۰۲۴ |
| نقشههای راه | ۱۱۹ |
| دورهها | ۱۴ |
| اشتراکها | ۱۷۹۱۴ |
@Html.ActionLink("text", "Index", "Home")
@Html.ActionLink("text", "Index", "Home")
@Html.ActionLink("text", result: MVC.Home.Index())
@Html.ActionLink("text", MVC.Home.ActionNames.Index, MVC.Home.Name)
@Url.Action(result: MVC.Article.Delete())
@Url.Action("Delete", "Article")
@{ Html.RenderPartial("_ViewPage1"); }
@{ Html.RenderPartial(MVC.Home.Views._ViewPage1); }
return PartialView(Views._ViewPage1);
return RedirectToAction(actionName: "Index", controllerName: "Menu");
return RedirectToAction(actionName: MVC.Menu.ActionNames.Index, controllerName: MVC.Menu.Name);
return RedirectToAction(result: MVC.Menu.Index());
return PartialView("~/Views/CommentsArchive/_LatestCommentsInfo.cshtml", data);
return PartialView(MVC.CommentsArchive.Views._LatestCommentsInfo, data);
<img src="@Links.Content.Images.arrow_right_png" alt="arrow" /> <script src="@Links.Scripts.jquery_1_5_1_min_js" type="text/javascript"></script>
Html.ActionLink(linkText: "عنوان",
actionName: "Index",
controllerName: "Comments",
routeValues: new
{
userName = @Model.FriendlyName
},
htmlAttributes: null))
Html.ActionLink(linkText: "عنوان",
result: MVC.Comments.Index(userName: @Model.FriendlyName)
htmlAttributes: null))
@Html.ActionLink(linkText: item.Name,result: MVC.Word.Details(id : item.ID, name : item.Name.ToSeoUrl() ))
Html.ActionLink("Delete Dinner", MVC.Dinners.Delete(Model.DinnerID)
.AddRouteValue("foo", 17)
.AddRouteValue("bar", "abc"))
<script type="text/javascript">
function LaodWordInfo(id) {
showProgress();
$.ajax({
type: "Post",
url: "test/Info",
data: JSON.stringify({ ID: id }),
contentType: "application/json; charset=utf-8",
dataType: "json",
complete: function (xhr, status) {
var data = xhr.responseText;
if (status === 'error' || !data) {
} else {
var dialog = $("#dialog");
dialog.html(data);
dialog.dialog("open");
}
hideProgress();
return false;
}
}
);
}
function showProgress() {
$('#Progress').css("display", "block");
}
function hideProgress() {
$('#Progress').css("display", "none");
}
$(function () {
$("#dialog").dialog({
autoOpen: false,
show: "fade",
hide: "fade",
width: 550,
title: "WordInfo",
resizable: false
});
});
</script>
آقا من نتونستم این فایلها رو دانلود کنم، خواهش میکنم یه راهی بگین تا منم بتونم دانلودشون کنم.با تشکر
24cc121c697f, by Michael Swain, Oct 22 8:39 PM XmlSettings Patch Patch to modify T4MVC to use an XML settings file instead of a static include. This allows for future compatability as long as setting types do not change.
[StringLength(25, ErrorMessageResourceType = typeof(ValidationErrorsResource), ErrorMessageResourceName = "InvalidStringLength")]
public string FatherName { get; set; }9/26/2015 6:48:04 PM - Supported Products : 9/26/2015 6:48:04 PM - Microsoft.VisualStudio.Ultimate 9/26/2015 6:48:04 PM - Version : [10.0] 9/26/2015 6:48:04 PM - Microsoft.VisualStudio.Ultimate 9/26/2015 6:48:04 PM - Version : [11.0] 9/26/2015 6:48:04 PM - Microsoft.VisualStudio.Premium 9/26/2015 6:48:04 PM - Version : [10.0] 9/26/2015 6:48:04 PM - Microsoft.VisualStudio.Premium 9/26/2015 6:48:04 PM - Version : [11.0] 9/26/2015 6:48:04 PM - Microsoft.VisualStudio.Pro 9/26/2015 6:48:04 PM - Version : [10.0] 9/26/2015 6:48:04 PM - Microsoft.VisualStudio.Pro 9/26/2015 6:48:04 PM - Version : [11.0]
Use StaticFilesFolders to tweak the list of folders from which links are generated
<!-- Folders containing static files for which links are generated (e.g. Links.Scripts.Map_js) -->
<StaticFilesFolders>
<FileFolder>Scripts</FileFolder>
<FileFolder>Content</FileFolder>
</StaticFilesFolders>Error1Running transformation: System.ArgumentException: The file 'T4MVC.tt' is not open. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) at Microsoft.VisualStudio.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure) at Microsoft.VisualStudio.Shell.RunningDocumentTable.FindDocument(String moniker, IVsHierarchy& hierarchy, UInt32& itemid, UInt32& docCookie) at Microsoft.XmlEditor.XmlHelper.GetCanonicalNameWithoutView(IServiceProvider site, String fname) at Microsoft.XmlEditor.XmlFileInfoService.RenameOrRemoveCacheFileInfo(String fname) at Microsoft.XmlEditor.Package.GetOrCreateFileInfo(String fname, String text) at Microsoft.XmlEditor.Package.GetOrCreateFileInfo(String fname, IVsTextLines buffer) at Microsoft.XmlEditor.FactoryBase.GetDesignerFactory(String monikerTheFileOnDisk, String monikerToUse, IVsTextLines existingBuffer, Guid logicalView) at Microsoft.XmlEditor.Chooser.ChooseEditorFactory(String pszMkDocument, IVsHierarchy pHier, UInt32 itemid, IntPtr punkDocDataExisting, Guid& rguidLogicalView, Guid& pguidEditorTypeActual, Guid& pguidLogicalViewActual) at EnvDTE.ProjectItem.Open(String ViewKind) at Microsoft.VisualStudio.TextTemplating07E2522337018FCFC0AADC805726764A22758F53E05D3026845E2AA5E0226E57B77322743831B8A035E8EFE18D3CC1F808985A2958CCE46A2085D3520D2EC605.GeneratedTextTransformation.XmlSettings.Init(ITextTemplatingEngineHost host) in e:\Project\GRP\GRP.Web\T4MVC.tt:line 2120 at Microsoft.VisualStudio.TextTemplating07E2522337018FCFC0AADC805726764A22758F53E05D3026845E2AA5E0226E57B77322743831B8A035E8EFE18D3CC1F808985A2958CCE46A2085D3520D2EC605.GeneratedTextTransformation.XmlSettings.Load[T](ITextTemplatingEngineHost host) in e:\Project\GRP\GRP.Web\T4MVC.tt:line 2093 at Microsoft.VisualStudio.TextTemplating07E2522337018FCFC0AADC805726764A22758F53E05D3026845E2AA5E0226E57B77322743831B8A035E8EFE18D3CC1F808985A2958CCE46A2085D3520D2EC605.GeneratedTextTransformation.MvcSettings.Load(ITextTemplatingEngineHost host) in e:\Project\GRP\GRP.Web\T4MVC.tt:line 1786 at Microsoft.VisualStudio.TextTemplating07E2522337018FCFC0AADC805726764A22758F53E05D3026845E2AA5E0226E57B77322743831B8A035E8EFE18D3CC1F808985A2958CCE46A2085D3520D2EC605.GeneratedTextTransformation.TransformText() in e:\Project\GRP\GRP.Web\T4MVC.tt:line 39e:\Project\GRP\GRP.Web\T4MVC.tt21201GRP.Web
private readonly ICacheService _cacheService;
public HomeController() : this(MvcApplication.CacheService)
{
}
public HomeController(ICacheService cacheService)
{
_cacheService = cacheService;
} SmObjectFactory.Container.GetInstance(controllerType) as Controller;
http://localhost:16926/T4MVC_System_Web_Mvc_ActionResult
protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
{
if (controllerType == null && requestContext.HttpContext.Request.Url != null)
throw new InvalidOperationException(string.Format("Page not found: {0}",
requestContext.HttpContext.Request.Url.AbsoluteUri.ToString(CultureInfo.InvariantCulture)));
return SmObjectFactory.Container.GetInstance(controllerType) as Controller;
} http://localhost:16926/cf05761417b442f293d1cd9f0bffd789/arterySignalR/ping?requestUrl=http%3A%2F%2Flocalhost%3A16926%2F&browserName=Firefox&_=1431790628217
routes.IgnoreRoute("{*browserlink}", new { browserlink = @".*/arterySignalR/ping" }); bundles.Add(new StyleBundle("~/Content/Css").Include(
//Bootstrap 3.3.7
//"~/content/application/AdminLTE/dist/css/bootstrap-theme.css",
Links.Content.application.AdminLTE.dist.css.bootstrap_theme_css
.
.
.
));