Click here to Skip to main content
15,867,568 members

Comments by Mr Ellipse (Top 2 by date)

Mr Ellipse 15-Aug-15 3:29am View    
There are quite a few things to be done here.

If you create a virtual directory in IIS, and point it to the UNC/network share, you can then use Server.MapPath() to access files. The account IIS is running under will need appropriate permissions on the UNC share.

Apart from that small piece of setup, all the class libraries you should need reside in System.IO namespace!

You can use FileInfo and DirectoryInfo classes to CRUD directories or files. System.IO.Compression.GZipStream can be used to compress or decompress files.

Hope this points you in the right direction!
Mr Ellipse 30-Jul-15 3:00am View    
You got it!

EF tracks the entire 'object graph' of changes. Because you are adding a new BatchProduct to the Data Context, when SaveChanges() is called, it will evaluate the BatchProduct.Product and BatchProduct.Batch navigation properties, and perform an insert/update on those as well.

The EF Data Context does all the work via proxy wrappers, which tracks changes made to it in memory as soon as an object is added to, or retrieved from the Data Context.

Batch = batch is not a typo. Its just a concise way of setting the .Batch property of new BatchProduct(). ;)

Cheers,