سؤال

I have businesslogic in an MVVM application - not really "data" but real logic, which mean "rules". Example: Dragging items inside a wpf TreeView, where each object is based on a viewmodel and has properties that depend upon business cases. Sure, these properties in the viewmodel are "business-specific". But I tend to not put a static, like "CanAcceptDragObject()", under "viewmodel" or "Model". What 's the common local place for such general (mostly static), business-specific code ?

هل كانت مفيدة؟

المحلول

I am having a hard time understanding your overall question but to answer your specific question, "where do I put business logic?" The answer, in most cases is the Model.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top