mvc-mini-profiler

Unable to setup MiniProfiler w/ Enity Framework 4.0 (Not code first)

情到浓时终转凉″ 提交于 2019-12-03 09:22:26
I installed MiniProfiler and MiniProfiler.EF in my project via nuget. Before using MiniProfiler I would open a connection using this in my model repository: public class NotificationRepository { private CBNotificationModel.CB_NotificationEntities db; public NotificationRepository() { db = new CB_NotificationEntities(); } public NotificationContact GetNotificationContacts() { return db.NotificationContacts.ToList(); } } To use mini profiler I created: public static class ConnectionHelper { public static CB_NotificationEntities GetEntityConnection() { var conn = new StackExchange.Profiling.Data

Using MVC Miniprofiler for every action call

廉价感情. 提交于 2019-12-03 06:01:19
问题 Iv been experimenting the great tool, Mvc MiniProfiler. I don't want to litter all my view with lots of Step commands, so I am wanting to use the profiler with every action call. Bad idea? This is what I have tried so far: public abstract class BaseController : Controller { protected override void OnActionExecuting(ActionExecutingContext filterContext) { var profiler = MiniProfiler.Current; using (profiler.Step("Action: "+filterContext.ActionDescriptor.ActionName)) { base.OnActionExecuting

Using mvc-mini-profiler with EF 4.0 and Ninject

这一生的挚爱 提交于 2019-12-03 02:35:27
I'm trying to use the new mvc-mini-profiler with my EF4 based app, but I have no idea how to properly get a connection to my destination datasource. Here's as far as I have gotten. Func<IMyContainer> createContainer = () => { var profiler = MiniProfiler.Current; if (profiler != null) { var rootConn = // ???? var conn = ProfiledDbConnection.Get(rootConn); return ObjectContextUtils.CreateObjectContext<MyContainer>(conn); } else { return new MyContainer(); } }; kernel.Bind<IMyContainer>().ToMethod(ctx => createContainer()).InRequestScope(); How do I get a connection to an EF container, without

Using MVC Miniprofiler for every action call

只谈情不闲聊 提交于 2019-12-02 19:25:03
Iv been experimenting the great tool, Mvc MiniProfiler . I don't want to litter all my view with lots of Step commands, so I am wanting to use the profiler with every action call. Bad idea? This is what I have tried so far: public abstract class BaseController : Controller { protected override void OnActionExecuting(ActionExecutingContext filterContext) { var profiler = MiniProfiler.Current; using (profiler.Step("Action: "+filterContext.ActionDescriptor.ActionName)) { base.OnActionExecuting(filterContext); } } } But I don't think this is doing what I am intending? I think I need to start the

Is there a port mvc-mini-profiler for Rails?

a 夏天 提交于 2019-12-02 15:35:06
I'm a big fan of the MiniProfiler created by Jarrod Dixon and the Stack Overflow team for ASP.NET. Is there a port of it for Rails applications? Since the core of the profiler is in JavaScript , JQuery.tmpl and Less it seems that porting the back-end to Rails would be fairly straight forward, the front-end is already done. The front end architecture allows for POST and AJAX request profiling by attaching profiling ids to every request in a custom header ( X-MiniProfiler-Ids ). There is a similar port for Python and GAE. Even though Rack Bug is fairly interesting, the UI is not as rich - POST

mvc-mini-profiler, entity framework gives: The space 'SSpace' has no associated collection

爷,独闯天下 提交于 2019-12-02 05:15:41
问题 I'm trying to use the mvc-mini-profiler in my mvc application. I created a wrapper for my context and Castle Windsor creates the instance. However, I get the error "The space 'SSpace' has no associated collection". The edmx is in assembly A, DigidosEntities in assembly B and this is in assembly C. Any idea what can be the problem? I got the latest version of the profiler. public interface IDataStore : IDisposable { int SaveChanges(int personId); IObjectSet<TEntity> CreateObjectSet<TEntity>()

How do i use MiniProfiler.Settings.CustomUITemplates

社会主义新天地 提交于 2019-12-02 03:54:19
问题 Good day. I have looked here on the previous post as well as on http://miniprofiler.com/ but cannot find any documentation on how to use MiniProfiler.Settings.CustomUITemplates . I also seen How to customize the Mini-Profiler UI which is not what require. We have a debug section below in our MVC4 layout page and I would like to list the results in a div at the bottom of the page instead of displaying it in a popup. I see that you can change the position of the popup but I would like to show

How could I instantiate a Profiled DataAdapter to use with MVC MINI PROFILER?

无人久伴 提交于 2019-12-02 02:31:59
None of the Command objects have Fill methods, but in the former way I was doing I could instantiate a new OracleDataAdapter. How could I instantiate a Profiled DataAdapter to profile my database activity with MVC MINI PROFILER? All I need is to use the Fill command with the profiled connection of MVC mini Profiler. [ UPDATE ] I think many must have done that before, unless they are using Entity Framework, which works nice and easy. In my case the query is loaded dynamically into a Datatable, and the entity cannot be mapped, since it is unknown by the application. The biggest problem after

mvc-mini-profiler, entity framework gives: The space 'SSpace' has no associated collection

大憨熊 提交于 2019-12-02 02:07:32
I'm trying to use the mvc-mini-profiler in my mvc application. I created a wrapper for my context and Castle Windsor creates the instance. However, I get the error "The space 'SSpace' has no associated collection". The edmx is in assembly A, DigidosEntities in assembly B and this is in assembly C. Any idea what can be the problem? I got the latest version of the profiler. public interface IDataStore : IDisposable { int SaveChanges(int personId); IObjectSet<TEntity> CreateObjectSet<TEntity>() where TEntity : class; } public class ProfiledDigidosEntities : IDataStore, IDisposable { private

How do i use MiniProfiler.Settings.CustomUITemplates

孤街浪徒 提交于 2019-12-02 00:46:16
Good day. I have looked here on the previous post as well as on http://miniprofiler.com/ but cannot find any documentation on how to use MiniProfiler.Settings.CustomUITemplates . I also seen How to customize the Mini-Profiler UI which is not what require. We have a debug section below in our MVC4 layout page and I would like to list the results in a div at the bottom of the page instead of displaying it in a popup. I see that you can change the position of the popup but I would like to show the results in a table instead. Can you please point me in the right direction. The code sais the