Question: I'm facing an issue with chrome 28.

I build an application that use the webcam to take picture.

I had no problem with it, but since I upgrade to chrome 28, my application is not working anymore (I'm getting an error with the getUserMedia function).

Here is the message : `{"constraintName":"","message":"","name":"PERMISSION_DENIED"}.`

If I try to run the app code on a simple `html` and `httpserver`, I got no problem with it.

And when using the APP I'm not asked anymore if I allow the usage of the webcam.

I've tried to turn on some chrome flags for webrtc but nothing change.

Does anybody has/had this issue ?

Thanks !

Answer: 
Try like this:

```
public class TempContext : DbContext
{
    public DbSet<Shop> Shops { get; set; }
    public DbSet<Certificate> Certificates { get; set; }

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
        modelBuilder.Entity<Shop>().HasRequired(x => x.Certificate);
    }
}

```
You could use the `Required` attribute to mark a property as required.

[MSDN](http://msdn.microsoft.com/de-de/library/system.componentmodel.dataannotations.requiredattribute.aspx)

Here is your example:

```
public class Shop
{
    int Id { get; set; }
    string Name { get; set;

    [Required]
    Certificate Certificate { get; set; }
}

```

[Here](http://blogs.msdn.com/b/efdesign/archive/2010/03/30/data-annotations-in-the-entity-framework-and-code-first.aspx) is an explanation of the different annotations.