One way to do it, is to define the constraint on the DB.
Since Entity Framework doesn't know about constraints at the DB level, you should then script the constraint (i.e., create a .SQL file) so that you can add it to any new instances of your DB.
Another way to do it is to implement a standard Repository per entity type (such as CustomerRepository) and then to do the check in that repository's Create method. This, by itself, does not guarantee unicity since two users may at the same time create an entity with the same name, and the check won't catch it until you try to commit (i.e., SaveChanges), but that is also the case when you define the unicity constraint on the DB...