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
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: LINQ
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 :)
Relevance software
I happened to create a simple relevance calculation tool for texts and going to upload it online soon.
Project
homepage and blog
hereJust wondered about huge opportunities for relevance calculations, and noone created good service for that.