Giter Club home page Giter Club logo

Comments (5)

rivantsov avatar rivantsov commented on August 29, 2024

pls post full stack trace

from vita.

sapatag avatar sapatag commented on August 29, 2024

a következő helyen: Vita.Common.Util.Throw(String message, Object[] args)
a következő helyen: Vita.Entities.EntityHelper.GetRecord(Object entity)
a következő helyen: Vita.Entities.Runtime.EntityBase.Equals(Object obj)
a következő helyen: System.Object.Equals(Object objA, Object objB)
a következő helyen: System.Windows.Data.ListCollectionView.SetNewItem(Object item)
a következő helyen: System.Windows.Data.ListCollectionView.BeginAddNew(Object newItem, Int32 index)
a következő helyen: System.Windows.Data.ListCollectionView.<>c__DisplayClass50_0.b__0()
a következő helyen: MS.Internal.Data.SynchronizationInfo.AccessCollection(IEnumerable collection, Action accessMethod, Boolean writeAccess)
a következő helyen: System.Windows.Data.BindingOperations.AccessCollection(IEnumerable collection, Action accessMethod, Boolean writeAccess)
a következő helyen: System.Windows.Data.ListCollectionView.AddNewCommon(Object newItem)
a következő helyen: System.Windows.Data.ListCollectionView.AddNewItem(Object newItem)
a következő helyen: VitaTest.Program.Main(String[] args) hely: D:\Projects\Tests\VitaTest\VitaTest\Program.cs, sor: 22
a következő helyen: System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
a következő helyen: System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
a következő helyen: Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
a következő helyen: System.Threading.ThreadHelper.ThreadStart_Context(Object state)
a következő helyen: System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
a következő helyen: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
a következő helyen: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
a következő helyen: System.Threading.ThreadHelper.ThreadStart()

from vita.

rivantsov avatar rivantsov commented on August 29, 2024

first, there's a bug in Vita, in Equals method, it should not throw ever. I will fix that (already did), will be there in next push
Still, from stack trace appears you're not doing it right. You should add the new entity to entity list that is returned from this LINQ expr in constructor parameter, not to ListCollectionView. It tries to check ViewItem or smth to list items.
Save the returned list in a field and add to it. I guess you need to convert the returned list to observable list, smth like this:

ObservableCollection _custList;
_custList = new ObservableCollection(session.EntitySet().OrderBy());
var newCust = session.NewEntitty();
_custList.Add(newCust);

Sorry, never worked with WPF

from vita.

sapatag avatar sapatag commented on August 29, 2024

Thx for the quick answer. I simplified the sample from a WPF MVVM ViewModel, with ObservableCollections etc. (The ObservableCollection calls the CollectionView's AddNewItem.)
I can avoid the exception with creating a model class and working with the modells, but I like Vita's elegant concept of interfaces.

from vita.

rivantsov avatar rivantsov commented on August 29, 2024

should be fixed now (entity comparison)

from vita.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.