<p>I am building an Entity Framework model for a subset of the Pubs database from microsoft. I am only interested and publishers and books, not publishers and employees, but there is a foreign key constraint between the publishers and emoloyees tables. When I remove the employees entity from my model, the model won't validate because of the foreign key constraint.</p>

<p>How do I create a model for a subset of a database when that subset links to other tabes with foreign key constraints?</p>

<p>Because this is for a demo, I deleted the offending tables and constraints from the database, but this won't work in production.</p>

Not sure what I'm missing here, but your
```
filesize
```
being -1 seems to be your problem.  The
API docs
clearly state that
```
expectedContentLength
```
may not be available and that
```
NSURLResponseUnknownLength
```
is returned in these cases.
```
NSURLResponseUnknownLength
```
is defined as:
```
```
#define NSURLResponseUnknownLength ((long long)-1)
```
```
In these cases, you cannot get an accurate progress.  You'll need to handle this and display an indeterminate progress meter of some sort.