LINQ InsertOnSubmit: NullReferenceException

前端 未结 6 2014
野的像风
野的像风 2020-12-06 16:22

I have this code:

using DC = MV6DataContext;
using MV6; // Business Logic Layer
// ...

public DC.MV6DataContext dc = new DC.MV6DataContext(ConnectionString)         


        
6条回答
  •  青春惊慌失措
    2020-12-06 17:01

    Actually it's better to add a call to your constructor that also calls the generic constructor such as:

    public IP(string address) : this() {
    ...
    }
    

提交回复
热议问题