Monday, September 20, 2010

Entity Framework (CTP4) links

I thought I wanted to share some of my EF CTP4 links

http://blogs.msdn.com/b/adonet/archive/2010/07/14/ctp4piwalkthrough.aspx
http://romiller.com/2010/07/18/ef-ctp4-tips-tricks-mapping-to-an-existing-database/
http://blogs.iis.net/shanselman/archive/2010/07/14/simple-code-first-with-entity-framework-4-magic-unicorn-feature-ctp-4.aspx
http://weblogs.asp.net/scottgu/archive/2010/08/03/using-ef-code-first-with-an-existing-database.aspx
http://huyrua.wordpress.com/tag/poco/
http://code.msdn.microsoft.com/EFDocSamples2010
http://romiller.com/2010/07/19/ef-ctp4-tips-tricks-wcf-data-service-on-dbcontext/
http://csharpbits.notaclue.net/2010/07/using-entity-framework-code-first-ctp4.html
http://romiller.com/2009/06/26/ntier-with-ef4-beta-1/
http://romiller.com/2010/07/31/ef-ctp4-tips-tricks-running-additional-ddl/
http://blogs.msdn.com/b/adonet/archive/2009/12/22/poco-proxies-part-1.aspx
http://msdn.microsoft.com/en-us/library/ee705457.aspx
http://blogs.msdn.com/b/efdesign/archive/2010/06/21/productivity-improvements-for-the-entity-framework.aspx
http://buildstarted.com/2010/08/27/entity-framework-with-many-to-many-one-to-many-and-one-to-one-relationships/
LINQ samples
ADO.NET Entity Framework Overview)

http://blogs.msdn.com/b/efdesign/archive/2008/11/20/n-tier-improvements-for-entity-framework.aspx
http://blogs.msdn.com/b/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx
http://romiller.com/2010/07/19/ef-ctp4-tips-tricks-wcf-data-service-on-dbcontext/

Problem with STA and WCF when using COM-objects

Scott Seely have a good post about how to solve calling STA COM Object from a WCF operation. In my case I had an old COM object that required STA.

Look here for Scott Seely's post

Friday, August 6, 2010

Entity Framework (CTP4)

Playing with the new Entity Framework I had a need to store files.


Simply add Byte[] to your CLR

public class Product
{
public int ProductId { get; set; }
[StringLength(40)]
public string Name { get; set; }
public Byte[] ProductImage { get; set; } //Maps to VARBINARY(MAX)
public string CategoryId { get; set; }

public virtual Category Category { get; set; }
}

Automapper

Just found Automapper which takes the boring part out of mapping by doing it automatically