ProjectTracker is in the Samples download.
That overload of CanReadProperty() is obsolete because it has reliability and performance issues.
You should use one of the other overloads:
CanReadProperty(string, bool); // pass in property name
CanReadProperty(PropertyInfo<T>, bool); // pass in property info token
Or move to the newer property declaration syntax available in 3.5+
public Guid Id
{
get { return GetProperty(IdProperty, _Id); }
}
LINQ to SQL is technically less efficient than raw ADO.NET. But
the code is simpler – so it is really a choice of maintainability vs
performance to some degree.
One note about the property declaration – there’s a
slightly better (more maintainable) syntax available in 3.6:
private static PropertyInfo<Guid>
IdProperty =
RegisterProperty<Guid>(new PropertyInfo<Guid>("Id"));
[System.ComponentModel.DataObjectField(true, true)]
public Guid Id
{
get { return GetProperty(IdProperty); }
}
Note that the first parameter of RegisterProperty() is gone, and
you don’t need the type parameter on GetProperty()/SetProperty() because
the compiler can infer the right type.
Rocky
From: jscontreras
[mailto:cslanet@lhotka.net]
Sent: Sunday, January 18, 2009 12:18 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] Receiving the following message:
Csla.Core.BusinessCase.CanReadProperty(Bool) is obsolete
Hi,
Thanks for the quick response:
I've upgrade to the 3.5 framework (Business and .NET) build the 3.5 CSLA
created a new reference to my BO Project and added this:
private byte[] mTimestamp = new byte">;
private static PropertyInfo<Guid> IdProperty =
RegisterProperty<Guid>(typeof(Project),
new PropertyInfo<Guid>("Id"));
[System.ComponentModel.DataObjectField(true, true)]
public Guid Id
{
get { return
GetProperty<Guid>(IdProperty); }
}
I was able to build the BO project.
Just getting use to the new Framework. BTW I was able to create the BO
for my framework in no time. And I also noticed in the 2008 version
you're using LINQ does this make the SQL more efficient (I've only done some
simp le examples with LINQ).
Thanks,
Copyright (c) Marimer LLC