I have an architecture wich goes like this
Repository -> BO -> WCF -> Web
and vica verse
Repository <- BO <- WCF <- Web
My question is, if I have just simple CRUD operation like just delete a record by its Id, would it be acceptable to skip the BO and go straight to the repository ?
Repository <- WCF <- Web
No, not acceptable – always take the same path 🙂
As Pontus is basically saying – either way is fine; but you have to choose one method and stick to it; be consistent. If you mix both you’re almost guaranteed to get bitten.
As for which one to take – either is ok if it meets your needs, the caveat is knowing what the relevant risks that might bite you long-term. I would almost always take the “BO” approach as the overhead isn’t that huge, and it’s very likely that you’ll avoid a lot of re-work if the demands on the system change; having the BO is definately safer long-term.