So here is my call
Guid deliveryId = p.DeliveryDomainId;
string test = "TEST";
Guid realDeliveryID = Changepoint_Entities.P_BOOST_GENGetCodeDetailId(test, deliveryId);
And this is the method I try to call wich is an SQL procedure, the code is auto generated from a dmx file so I can't change this :
public virtual ObjectResult<Nullable<System.Guid>>P_BOOST_GENGetCodeDetailId(string codeType, Nullable<System.Guid> codeDetail)
{
var codeTypeParameter = codeType != null ?
new ObjectParameter("CodeType", codeType) :
new ObjectParameter("CodeType", typeof(string));
var codeDetailParameter = codeDetail.HasValue ?
new ObjectParameter("CodeDetail", codeDetail) :
new ObjectParameter("CodeDetail", typeof(System.Guid));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Nullable<System.Guid>>("P_BOOST_GENGetCodeDetailId", codeTypeParameter, codeDetailParameter);
}
I get this error when compiling :
Error 30 An object reference is required for the non-static field, method, or property 'EBE.Entities.Changepoint_Entities.P_BOOST_GENGetCodeDetailId(string, System.Guid?)' d:\userfiles\aorset\documents\gitrepo\dpaebe\ebe_final\ebe_final\controllers\datacontroller.cs 462 39 EBE_Final
I am a bit of a noobie in C# so I don't really what I am doing wrong. Do I need to use statics or something ? Because the call is in a for loop so I don't know what to do. Thanks in advance :)