Cannot convert lambda expression to type

Jul 10, 2010 at 10:25 PM


Thank you on this.extension. I am spending some of my time on learning with this nice extension and i am trying to work with it on my project.
Today i downloaded a new extension from this site and runned in problem, this error showes up:

Error 1 Cannot convert lambda expression to type 'Csla.PropertyInfo' because it is not a delegate type

on line:

protected static PropertyInfo<short> GrupaIDProperty = RegisterProperty<short>(c => c.GrupaID);


Even when i create a new solution / project, this problem won't go away.
Has anybody been having problems with this ?

Jul 10, 2010 at 11:56 PM


Take a look at You probably reference old version of Csla.dll.


Jul 11, 2010 at 4:36 PM

Thank you, i solved my problem.

Nov 10, 2010 at 10:55 AM

Hi Orecj

Could you share the solution please - I'm having the same problem and could do with sorting it out - frustrating



Nov 10, 2010 at 11:37 AM

Hi nkgraham.

Which CSLA version are you using? Please post more info about this error.



May 20, 2013 at 10:10 PM
I'm using Csla and receiving the 'Cannot convert lambda expression to type 'Csla.PropertyInfo<decimal>' because it is not a delegate type' compiler error.

The OrderBase class defines Id, Name, and ItemCost as follows:
    public abstract class OrderBase : BusinessBase<OrderBase>
        #region Business Methods

        // TODO: add your own fields, properties and methods

        // example with private backing field
        public static readonly PropertyInfo<int> IdProperty = RegisterProperty<int>(p => p.Id, RelationshipTypes.PrivateField);
        private int _Id = IdProperty.DefaultValue;
        public int Id
            get { return GetProperty(IdProperty, _Id); }
            set { SetProperty(IdProperty, ref _Id, value); }

        // example with managed backing field
        public static readonly PropertyInfo<string> NameProperty = RegisterProperty<string>(p => p.Name);
        public string Name
            get { return GetProperty(NameProperty); }
            set { SetProperty(NameProperty, value); }

        public static readonly PropertyInfo<decimal> ItemCostProperty = RegisterProperty<decimal>(c => c.ItemCost);
        public decimal ItemCost
            get { return GetProperty(ItemCostProperty); }
            set { SetProperty(ItemCostProperty, value); }
However, when inheriting from this clsass and attempting to add the property 'FreightCost' as follows:
    public class Invoice : OrderBase

        public Invoice()

        public static readonly PropertyInfo<Decimal> FreightCostProperty = RegisterProperty<Decimal>(c => c.FreightCost);
        public Decimal FreightCost
            get { return GetProperty(FreightCostProperty); }
            set { SetProperty(FreightCostProperty, value); }
I receiving the compiler exception. What am I doing wrong?