LINQ-to-SQL WCF by ygq15756

VIEWS: 15 PAGES: 80

									




    
    


















They had a great architecture…

























    
    
    
    
    



    
        •
    
        •







   using (var db = new NorthwindDataContext())
    {
        return db.Customers.ToList();
    }


    
    
    




    
    





























    


    
    


    
    


    
    
    
    



    
    
    








Error #1 – Connection String


    
    
    
    


    
    
    
    




Error #2 – Underlying connection was
closed











Serializable LINQ to SQL classes
   [Table(Name="dbo.Customers")]
    [DataContract()]
    public partial class Customer :
    INotifyPropertyChanging, INotifyPropertyChanged
    {
         [Column(Storage="_CustomerID", DbType="NChar(5)
    NOT NULL", CanBeNull=false, IsPrimaryKey=true,
    UpdateCheck=UpdateCheck.Never)]
         [DataMember(Order=1)]

        public string CustomerID







    
    


    
    



















    
    
    


    
    
    







   
























    
    
    
    



























    
    
•



•

    




    






    
    
    
    








    






    
    
    


    



    



    



    




								
To top