public static Exigo.OData.Extended.extendeddatacontext CreateCustomODataContext() { var context = new Exigo.OData.Extended.extendeddatacontext(new Uri("http://api.exigo.com/4.0/" + Company + "/db/extendeddatacontext")); context.IgnoreMissingProperties = true; context.IgnoreResourceNotFoundException = true; var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(LoginName + ":" + Password)); context.SendingRequest += (object s, SendingRequestEventArgs e) => e.RequestHeaders.Add("Authorization", "Basic " + credentials); return context; }
public static Exigo.OData.Extended.extendeddatacontext CreateExtendedODataContext() { var context = new Exigo.OData.Extended.extendeddatacontext(new Uri(APIUrl + "/db/extendeddatacontext")); context.IgnoreMissingProperties = true; context.IgnoreResourceNotFoundException = true; var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(LoginName + ":" + Password)); context.SendingRequest += (object s, SendingRequestEventArgs e) => e.RequestHeaders.Add("Authorization", "Basic " + credentials); return(context); }