Questions tagged [unitofworkapplication]

12 questions
7
votes
5 answers

What is the source of the unit of work pattern?

On this page I read the following: A unit of work is a design pattern described by Martin Fowler Did Martin Fowler discover this pattern before the Hibernate developers and is he the only source of describing this pattern?
darpet
  • 3,073
  • 3
  • 33
  • 40
6
votes
2 answers

NHibernate Session Management Advice

I need some advice on NHibernate Session Management for a C# WinForms application. I am currently porting an application to use NHibernate. I am also employing a UnitOfWork pattern as described in the link…
Hugusta
  • 125
  • 1
  • 4
3
votes
3 answers

NHibernate Unit Of Work - Multiple Sessions (WinForms)

I am struggling with the learning curve for NHibernate. We are currently porting our C# Winforms application to use NHibernate and are employing the Unit Of Work (UnitOfWork) as detailed by Gabriel Schenker. NHibernate and the Unit of Work…
Piere
  • 83
  • 1
  • 4
2
votes
3 answers

ASP.NET MVC - Using UnitOfWork

I'm currently working on a web app which consist of 6 layers: Web (reference to ViewModels and Controllers) ViewModels Controllers Services (reference to Data and Entities) Data (reference to Entities) Entities What I'm trying to is to implement…
ebb
  • 9,297
  • 18
  • 72
  • 123
2
votes
0 answers

Unit of Work pattern and persistence

I have been reading about Unit of Work pattern but I am confused about how the UoW actually persists data. When we commit the changes, UoW should iterate through the list of Added, Updated and Deleted objects and somehow find a class responsible to…
Mosh
  • 5,944
  • 4
  • 39
  • 44
1
vote
1 answer

Rhino UnitOfWorkApplication + Castle Automatic Transaction Management application does not flush automatically on request end

I'm building ASP.Net MVC aplication based on UnitOfWorkApplication and I'd like to use Castle ATM facility. At the moment I've problem with flushing the session on request end. My service class (which is called in my controller action method) looks…
1
vote
0 answers

c# - ASP.NET web api controller not working when injecting service

When i input interface/services my API is not get, but when i commented my interface/services, it works. ill try using different API with the same code as this and it works. Controller: private readonly IUnitOfWorkAsync _unitOfWork; private…
1
vote
2 answers

How to create a static UnitOfWork for entity framework 4?

Considering this class public class XQueries { public IQueryable Query1() { using (XEntities context = new XEntities()) { return something; } } public IQueryable Query2() { using…
0
votes
1 answer

Is it possible to use Rhino.Commons.HttpModules.UnitOfWorkApplication in ASP.NET 3.5 (not MVC)?

I tried to find tutorials/articles on using UnitOfWorkApplication in ASP.NET (not MVC). But all information I can find is about how to use it in ASP.NET MVC. Does it mean that it is not possible to use…
0
votes
1 answer

Update parent table from child in Asp.net and fluent nhibernate

I'm trying to update the data in the parent table that is referenced in the child table from the child's view in Asp.net. I mapped the tables using Fluent Nhibernate. In the child table, the mapping looks like this: public class ChildMap:…
0
votes
2 answers

C#.NET: does TransactionScope object synchronizes the access to code among multiple threads of users ?

Does the TransactionScope object also synchronizes the access to code among Multiple threads of Users ? OR, it only declares the code (Business Operations) as atomic (single Transaction)? Details: 1. I am implementing UnitOfWork class for…
Fakhar Anwar
  • 295
  • 1
  • 3
  • 20
-1
votes
1 answer

Unable to resolve service for type 'Api.Repositories.UnitOfWork' while attempting to activate 'Api.ServicesBusiness.EquipoServices'

I want to make a webapi and I'm trying to do it through the services way, I have a repository generic and another 2 repository and a unit of work, apparently everything goes fine, but when I run and test the webapi from postman I got that…