We are evaluation Linq2Sql for internal applications, and our development guidelines mean that we must always use stored procedures for all CRUD operations, from various blogs i have got together an application that does much of what we want.
However, what i would like to do is when we have a relationship between two entities the relationship can be fulfilled automatically.
For example if i had an instance of a Person object I would like to be able to say
var absenceCount = persons.Absence.Count()
but because we do not have select permission on the Absence table we get a Sql exception.
is there anyway around this?
By sheer chance I came across a couple of blog posts which prove this is possible, I have tested it and it works a treat
basically having methods called Load calling into your stored proc added into your DataContext class will allow this to work
links with examples here
Damien Guard
Msdn