public class Baazaar : DataService<ObjectContext> { // This method is called only once to initialize service-wide policies. public static void InitializeService(DataServiceConfiguration config) { config.SetEntitySetAccessRule("*", EntitySetRights.All); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; } protected override ObjectContext CreateDataSource() { BaazaarDbContext nw = new BaazaarDbContext(); // Configure DbContext before we provide it to the // data services runtime. nw.Configuration.ValidateOnSaveEnabled = false; // Get the underlying ObjectContext for the DbContext. var context = ((IObjectContextAdapter)nw).ObjectContext; // Return the underlying context. return context; } }
private void cmdDelete_Click(object sender, RoutedEventArgs e) { //DataGridRow drg = (DataGridRow)grdDetails.SelectedItem; //if (drg != null) //{ // drg.FindName(""); //} MyBaazaarContext cxnt = new MyBaazaarContext(); Currency cur = new Currency(); cur.ThreeLetterIsoCode = "Deve"; cxnt.AddToCurrency(cur); //radDataServiceDataSource1.DataContext= grdDetails.DataContext; //radDataServiceDataSource1.SubmitChanges(); //radDataServiceDataSource1.SubmitChanges() // radDataServiceDataSource1.sub }
An error occurred while processing.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)