Search Results

Search found 28 results on 2 pages for 'savvas dalkitsis'.

Page 2/2 | < Previous Page | 1 2 

  • Windsor IHandlerSelector in RIA Services Visual Studio 2010 Beta2

    - by Savvas Sopiadis
    Hi everybody! I want to implement multi tenancy using Windsor and i don't know how to handle this situation: i succesfully used this technique in plain ASP.NET MVC projects and thought incorporating in a RIA Services project would be similar. So i used IHandlerSelector, registered some components and wrote an ASP.NET MVC view to verify it works in a plain ASP.NET MVC environment. And it did! Next step was to create a DomainService which got an IRepository injected in the constructor. This service is hosted in the ASP.NET MVC application. And it actually ... works:i can get data out of it to a Silverlight application. Sample snippet: public OrganizationDomainService(IRepository<Culture> cultureRepository) { this.cultureRepository = cultureRepository; } Last step is to see if it works multi-tenant-like: it does not! The weird thing is this: using some line of code and writing debug messages in a log file i verified that the correct handler is selected! BUT this handler seems not to be injected in the DomainService. I ALWAYS get the first handler (that's the logic in my SelectHandler) Can anybody verify this behavior? Is injection not working in RIA Services? Or am i missing something basic?? Development environment: Visual Studio 2010 Beta2 Thanks in advance

    Read the article

  • Linq to SQL EntitySet Records causing duplicate insertion

    - by Savvas Sopiadis
    In a WPF application i'm using Linq to SQL in a multi tier application. (This is an archailogy photo filing application), so every excavation has its corresponding Pictures, thus a one-to-many relationship. This relationship is correctly created by SQLMetal (which i'm using to create the POCOs). So here is the situation i 'm having trouble with: Saving changes (either of new or altered objects) is done through UnitOfWork() pattern this way: using (IUnitOfWork unitOfWork = UnitOfWork.Begin()) { //if this is a new record if (SelectedExcavation.excavation.ExcavationId == 0) { IsNewRecord = true; excavService.Add(SelectedExcavation.excavation); } //send the actual changes to the dbms unitOfWork.Commit(); } Everything works fine! BUTTTT!!! Whenever a record gets updated which has (already at least one ) corresponding Picture Record: 1) a new Excavation Record is inserted 2) the current Excavation Record gets updated 3) the previous Picture Record gets its Id changed to the newly created ExcavationId What is going on under the hood? Does Linq to SQL not handle such simple update scenarios? Thanks in advance

    Read the article

< Previous Page | 1 2