I am developing an MVC-ish (possibly more like MVP) desktop application, using Unity, which has a main UI thread and periodically runs async tasks in the background. The main window's UI events are handled by MainController. When the user opens a new
I'm working on a wpf application. I have a shell which has a region. And I have two views, one is for editing person object and the other one is for listing all personnel (an observable collection). Two views are working correctly. Whenever I use per
I have a MVVM model, where my view-model contains an observableCollection<RfidData>. Whenever data in this is updated, I would like to call RaisePropertyChanged() on the properties. I saw somewhere it could be done quite cleverly with the Unity IoC
I'm introducing Dependency Injection to my project. I've got a dialog window, which serves as an editor to either new or existing entity. Its ViewModel looks like the following: public class ContractWindowViewModel { private IRepository<Contract> co
Is there any equivalent to the: Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule(typeof(UnityPerRequestHttpModule)); Found in the Unity Mvc Bootstrap but for the WebApi Boostrap?Yep, Unity.WebAPI nuget package + re
I'm trying to add a WebAPI to an existing ASP.Net MVC project and my question is regarding Unity: Before with UnityMVC alone, the project had in the App_Start folder, the class UnityConfig with the following code: container.RegisterType<IUnitOfWork,
I just starting with Unity Container and my registration looks like this: static void UnityRegister() { _container = new UnityContainer(); _container.RegisterType<IBook, Book>(); _container.RegisterType<IBookRepository, BookRepository>("B
I am using visual studio 2013 with unity 3.5 downloaded using nuget. I have Container class that looks like the following public class Container { static IUnityContainer _container; //<- System IDisposable error on _container static ILogger _logger =
I'm very new to using Unity, but my problem is that whenever I call my web service, I get an exception stating that "Make sure that the controller has a parameterless public constructor" I've followed multiple tutorials and I still get the same
Repositiory, OrderRequestRepository.cs public OrderRequestRepository(IntranetApplicationsContext context, ILogger logger) { _context = context; _logger = logger; } ...CRUD Methods public void Dispose() { Dispose(true); } protected virtual void Dispos
I m reading Prism library by microsoft. I just dont understand ConfigureContainer(). The code in shell application like this: internal class JamSoftBootstrapper : UnityBootstrapper { protected override IModuleEnumerator GetModuleEnumerator() { return
I would like to be able to register 2 class for the same interface in my Unity container. Then, I would like to select the current implementation based on a parameter. Here is my interface: public interface ICheckService { HttpResponseMessage Validat
I have trouble getting navigation working using Prism 4. I've set up a test solution in which I have a shell with a region called MainRegion: <Window x:Class="PrismNavigationTest.ShellView" xmlns="http://schemas.microsoft.com/winfx/2006/
I am a lone developer and Pluralsight is my salvation in helping me understand things like Repository and IoC, which I am just learning. However I am finding the pattern awkward to use. So I am using Unity IoC, and following ModelContainer class; pub
I have an FTP utility responsible for the usual FTP stuff: put file, get file, etc. As part of our infrastructure, we require components to retrieve their configuration from a component implementing an IConfiguration interface and to log their entrie
I have a WPF Code which looks something like this. public class AlphaProductesVM : BaseModel { private ObservableCollection<Alphabetical_list_of_product> _NwCustomers; private int i = 0; public AlphaProductesVM () { _NwCustomers = new ObservableColl
It could seem a stupid question because in my code everything is working, but I've registered a singleton this way with my Unity container _ambientContainer: _ambientContainer.RegisterType<Application.StateContext>(new ContainerControlledLifetimeMan
I have a standard Order/OrderLineItem setup. A number of Refunds are generated during the day that are persisted during the day, the Refund consists of a an Order Id and 1 or more LineItemId's. I need to consolidate these (in a Windows Service) at th
I've been having really bad memory problems with an ASP.NET Application. It seems as if every time the page loads, the old previous instance of the page is not removed from memory. If you press F5 ten times, the memory adds 10-20MB to the instance. D
Can anyone help. I have a serious problem with my Unity and bootloader. Its a circular reference.. Let me explain what i have currently. MainApp (winforms) ServiceLayer - c# project DependencyInjection - c# Project for the Container Bootloader - c# p
I have two example classes class ClassToResolve { private List<CollectionItem> _coll; public ClassToResolve(List<CollectionItem> coll) { _coll = coll; } } class CollectionItem { //... } and I need to resolve ClassToResolve var classToResolve =
My main ASP.NET MVC composite application uses a global Unity container to register types. The app sets the controller factory up to use this global container. I would like to refactor this such that each one of my portable areas leverages it's own c
Possible Duplicate: Can dependency injection prevent a circular dependency? I am developing a framework which will have various services like dal, integration with sharepoint, exception handling etc. I need to do it in IoC and I am new to this approa
I'm tried to use Dependency Resolver with Unity, and got some problem when my Controller creating. Here example of controller: public class AccountController : Controller { private readonly ICourseService _courseService; public AccountController(ICou
My current implementation of some ASP.NET web application registers all repository classes and some helper service classes in my wrapper around unity container: public class MyUnityContainer : UnityContainer { public MyUnityContainer () { string strC
Here's the basic setup. On an ASP.Net website, there are a few pages that display reports from data that comes from a database. All the data comes via stored procedures that is accessed usign Linq to Sql. These pages may have some very high traffic a
Can someone direct me to a good example of Unity Dependency Injection for WCF services? Any blog or msdn article will also help.This answer gives an example on how to enable DI in WCF with Castle Windsor. Just replace the IWindsorContainer with an IU
Yesterday I've implemented the code: CustomerProductManager productsManager = container.Resolve<CustomerProductManager>(); It was compilable and working. Today (probably I've modified something) I am constantly getting the error: The non-generic met
I am trying to use unity to automatically inject a datacontext on my repository using a new instance each time.., my idea is the ensure that each time a new datacontext is injected Currently its failing on creating the repository, i think it can't re
My controllers now implement an interface and inject a repository implementation using the Unity framework. My question is, are these injected implementations singletons? Does that mean all of my users hitting the repository (from the controller) use