-1

Can I extend or use partial classes to add more functions to EntityCollection< Class>

eg.

this is the auto-generated classses from LINQ to SQL

customer.Orders

I want to be able to do

customer.Orders.FindByOrderID(orderID)

but Order is EntityCollection < Order >

Can I make this a partial class or extend it like I can do with just the Order class?

soldieraman
  • 2,630
  • 7
  • 39
  • 52

1 Answers1

-1

Yes I can

public static class OrderExtension
{
    public static Order FindByOrderID(this EntityCollection<Order> orders, String orderID)
    {
soldieraman
  • 2,630
  • 7
  • 39
  • 52