Tuesday, February 19, 2008

How to autogenerate PK - Guid and other default properties in your LINQ class

partial class Invitation
{
partial void OnCreated()
{
if (Id == Guid.Empty)
{
this.Id = Guid.NewGuid();
this.CreatedDate = DateTime.Now;
}
}

}
Also in this sample I am setting CreatedDate for my objects. Works fine.




Applies to all dotnet languages: C#, VB.NET, C++.NET, J#

Labels:

LINQ - ChangeConflictException when updating row

System.Data.Linq.ChangeConflictException: Row not found or changed


I had very simple 4 lines:

ltsRmzLightDataContext data = new ltsRmzLightDataContext();

invitation = data.Invitations.SingleOrDefault(email => email.Id == invitationId);

if (invitation != null)

{

invitation.IsAccepted = true;

data.SubmitChanges();

}

and was getting System.Data.Linq.ChangeConflictException: Row not found or changed in this simple piece.

After long googling I fed up and reviewed my class in designer. For me, my problem was that I added few properties and one of them has incorrect name and NUllable property set.

After fixing this it all started to work fine.



Applies to all dotnet languages: C#, VB.NET, C++.NET, J#

Labels:

Wednesday, November 29, 2006

10 Marketing trends in 2007

Article covers consumer trends, trends in traditional media, and hot online trends.

I was interested mostly in online trends which are:
  • Web conferencing as a tool to make demo or even sales from home
  • Online research used by about 87% of customers before buying someting in person in store
  • Local search in major search engines used more often
Need internet marketing outsourcing services?

Tuesday, November 28, 2006

Two catalogs of AJAX materials

List of AJAX development tutorials available at:
http://shibz.com/2006/11/15/web-development-tutorials/

List of "all" AJAX free tools posted here
http://facers2006.blogspot.com/2006/11/free-ajax-tools.html
by GSINGH

Most complex part - find best AJAX toolkit to your needs is not solved :)

Friday, November 24, 2006

!relevance Software

Relevance software


I happened to create a simple relevance calculation tool for texts and going to upload it online soon.
Project homepage and blog here
Just wondered about huge opportunities for relevance calculations, and noone created good service for that.