c# - Caliburn.Micro and virtual methods -


i updating project written else. project written in c#, wpf , implements mvvm pattern of caliburn.micro. data access layer written using orm nhibernate , database sql db.

i noticed project using eager loading every fetch, want change lazy loading. stumbled upon problem trying fix on week now, hence question here on stackoverflow.

some information:

a shorter version of poco class:

using caliburn.micro; namespace kassaopm.domain { public class klant : propertychangedbase {     private int _id;     private string _naam;      public virtual int id     {         { return _id; }         set         {             _id = value;             notifyofpropertychange(() => id);         }     }      public virtual string naam     {         { return _naam; }         set         {             _naam = value;             notifyofpropertychange(() => naam);         }     } } 

the propertychangedbase comes caliburn.micro.propertychangedbase. when nhibernate wants use lazy loading requires every property , method virtual, can't set notifyofpropertychange method virtual since caliburn.micro.

if try , run application following message:

the following types may not used proxies: kassaopm.domain.klant: method add_propertychanged should 'public/protected virtual' or 'protected internal virtual' kassaopm.domain.klant: method remove_propertychanged should 'public/protected virtual' or 'protected internal virtual' kassaopm.domain.klant: method notifyofpropertychange should 'public/protected virtual' or 'protected internal virtual' kassaopm.domain.klant: method get_isnotifying should 'public/protected virtual' or 'protected internal virtual' kassaopm.domain.klant: method set_isnotifying should 'public/protected virtual' or 'protected internal virtual' 

i have no idea how solve this. hoping here on stackoverflow has solution or different approach.

if need more information please let me know , try best give need.

thanks in advance


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -