I don't have a definitive guide, but I definitely have a preference. I prefer to put a break after everything.
Here's a lambda expression I use in my service layer
Return _RegionRepository.GetRegions() _
.Where(Function(r) (r.Region = region _
And r.ParentID = parentid _
And r.isActive)) _
.FirstOrDefault()
Notice the underscore after every query item
Here's an update method that I use
Dim _user = (From u In dc.Users
Where u.ID = user.ID
Select u).Single
With _user
.About = user.About
.BirthDate = user.BirthDate
.Email = user.Email
.isClosed = user.isClosed
.isProfileComplete = user.isProfileComplete
.RegionID = user.RegionID
.ParentRegionID = user.ParentRegionID
.Reputation = user.Reputation
.UserName = user.UserName
.WebSite = user.WebSite
End With
dc.SubmitChanges()
Basically I like everything nice and clean and to have every "thought" on it's own line.
rockinthesixstring
2010-07-28 03:23:23