Search Results

Search found 2 results on 1 pages for 'adrakadabra'.

Page 1/1 | 1 

  • nhibernate3 weaknesses

    - by Adrakadabra
    from the moment we've migrated from hibernate 2 to hibernate3 ,around 30% of queries can not execute anymore,while there were not any problem with the previous version. does anybody have such problems? for example some of errors we see r like these Specified cast is not valid: Repository<CountrySubdivision>.Find(p => p.Parent.Id == parentId); specified method is not supported: public JsonResult AllEducationDegree(string search) { var data = Repository<EducationDegree> .FindBySpecification(new EducationDegreeSpecification().Search(search)) .Take(10) .Select(p => new NameValue(p.Title, (int)p.Id)) .ToList(); // .AsDropdown(" "); return Json(data, JsonRequestBehavior.AllowGet); } public class EducationDegreeSpecification : FluentSpecification<EducationDegree> { public EducationDegreeSpecification Search(string EducationDegreeSearch) { if (!String.IsNullOrEmpty(EducationDegreeSearch)) { string[] searchs = EducationDegreeSearch.Split(' '); foreach (string search in searchs) { if (!String.IsNullOrEmpty(search)) { AddExpression(p => p.Title.Contains(search)); } } } return this; } }

    Read the article

  • a problem with parallel.foreach in initializing conversation manager

    - by Adrakadabra
    i use mvc2, nhibernate 2.1.2 in controller class i call foreachParty method like this: OrganizationStructureService.ForEachParty<Department>(department, null, p => { p.AddParentWithoutRemovingExistentAccountability(domainDepartment, AccountabilityTypeDbId.SupervisionDepartmentOfDepartment); } }, x => (!(x.AccountabilityType.Id == (int)AccountabilityTypeDbId.SupervisionDepartmentOfDepartment))); static public void ForEachParty(Party party, PartyTypeDbId? partyType, Action action, Expression expression = null) where T : Party { IList chilrden = new List(); IList acc = party.Children; if (party != null) action(party); if (partyType != null) acc = acc.Where(p => p.Child.PartyTypes.Any(c => c.Id == (int)partyType)).ToList(); if (expression != null) acc = acc.AsQueryable().Where(expression).ToList(); Parallel.ForEach(acc, p => { if (partyType == null) ForEachParty<T>(p.Child, null, action); else ForEachParty<T>(p.Child, partyType, action); }); } but just after executing the action on foreach.parallel, i dont know why the conversation is getting closed and i see "current conversation is not initilized yet or its closed"

    Read the article

1