Question: What's the difference between a repository and a service? I don't seem to grasp it.

I'm talking about data access through a data access layer, typically with linq to sql.

Very often i see repositories with simple CRUD methods, and services with more business-specific methods.

We can take [this](https://web.archive.org/web/20160702012441/https://weblogs.asp.net/rashid/shrinkr-url-shrinking-service-developed-with-entity-framework-4-0-unity-asp-net-mvc-and-jquery-part-1) blog post as an example. If you look at the interfaces at the bottom (images), he has two repositories and two services. How does one know what to put where?

As I said, repositories seems to be more for CRUD-like operations and Services more business oriented.

Answer: 
I would say as a first try, in the general sense (until you give more context if you have one):

* a **repository** is where you place some global objects, to be used later.
* a **service** is a business logic code, made explicit (and ideally separated from the Presentation layer, and database layer ?)
A repository handles the data access and the service calls into it after performing any business logic needed.

@David 's answer definitely helped me but I would like to skew his approach a bit.

**The Bank Metaphor:** The bank holds your money in a vault, the vault is a database. The teller can deposit or withdraw from the vault, the teller is the repository. The customer is the one who asks the teller to deposit or withdraw, the customer is the service.

You can even take it further and say your employer (whoever writes your check) is the controller :D

*The controller hands you your check -> you validate to make sure everything is correct before giving it to the teller -> the teller deposits.*

So by thinking of it this way you can see the repository only cares about doing database operations or transactions, many services/customers can go to the same repository/teller.