当前位置: 首页>>代码示例>>C#>>正文


C# DAL.SubmitChanges方法代码示例

本文整理汇总了C#中DAL.SubmitChanges方法的典型用法代码示例。如果您正苦于以下问题:C# DAL.SubmitChanges方法的具体用法?C# DAL.SubmitChanges怎么用?C# DAL.SubmitChanges使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DAL的用法示例。


在下文中一共展示了DAL.SubmitChanges方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Delete

 internal static void Delete(DAL.CustomersDataContext dc, ItemPricing itemPricing)
 {
     DAL.ItemPricing dalItemPricing = findRecord(dc, itemPricing.Id);
     dalItemPricing.Deleted = true;
     dc.SubmitChanges();
 }
开发者ID:esegura,项目名称:CustomerManagement,代码行数:6,代码来源:ItemPricing.cs

示例2: SaveDependent

        internal void SaveDependent(DAL.CustomersDataContext dc, DAL.Item dalItem)
        {
            DAL.ItemPricing dalItemPricing = null;

            if (this.Id == 0)
            {
                dalItemPricing = new DAL.ItemPricing();
                map(this, dalItemPricing);
                dalItemPricing.Item = dalItem;
                this.ItemId = dalItem.Id;
                dc.ItemPricings.InsertOnSubmit(dalItemPricing);
            }
            else
            {
                dalItemPricing = findRecord(dc, this.Id);
                map(this, dalItemPricing);
            }

            dc.SubmitChanges();
            this.Id = dalItemPricing.Id;
        }
开发者ID:esegura,项目名称:CustomerManagement,代码行数:21,代码来源:ItemPricing.cs

示例3: SaveDependent

        internal void SaveDependent(DAL.CustomersDataContext dc, DAL.Customer c)
        {
            DAL.Login dalLogin = null;

            if (this.Id == 0)
            {
                dalLogin = new CustomerManagement.DAL.Login();
                map(this, dalLogin);
                dalLogin.Customer = c;
                this.CustomerId = c.Id; // handles the case where the whole graph is saved with one Save() call
                dc.Logins.InsertOnSubmit(dalLogin);
            }
            else
            {
                dalLogin = dc.Logins.Where(record => record.Id == this.Id).Single();
                map(this, dalLogin);
            }

            dc.SubmitChanges();
            this.Id = dalLogin.Id;
        }
开发者ID:esegura,项目名称:CustomerManagement,代码行数:21,代码来源:Login.cs

示例4: Delete

 internal static void Delete(DAL.CustomersDataContext dc, Login item)
 {
     DAL.Login dalLogin = dc.Logins.Where(l => l.Id == item.Id).Where(l => !l.Deleted).Single();
     dalLogin.Deleted = true;
     dc.SubmitChanges();
 }
开发者ID:esegura,项目名称:CustomerManagement,代码行数:6,代码来源:Login.cs

示例5: Delete

 internal static void Delete(DAL.CustomersDataContext dc, Phone item)
 {
     DAL.Phone dalPhone = dc.Phones.Where(p => p.Id == item.Id).Where(p => !p.Deleted).Single();
     dalPhone.Deleted = true;
     dc.SubmitChanges();
 }
开发者ID:esegura,项目名称:CustomerManagement,代码行数:6,代码来源:Phone.cs

示例6: SaveDependent

        internal void SaveDependent(DAL.CustomersDataContext dc, DAL.Customer c, int actionPerformerId)
        {
            DAL.Address dalAddress = null;

            if (this.Id == 0)
            {
                dalAddress = new CustomerManagement.DAL.Address();
                map(dc, this, dalAddress, actionPerformerId);
                dalAddress.Customer = c;
                this.CustomerId = c.Id; // handles the case where the whole graph is saved with one Save() call
                dc.Addresses.InsertOnSubmit(dalAddress);
            }
            else
            {
                dalAddress = dc.Addresses.Where(record => record.Id == this.Id).Single();
                map(dc, this, dalAddress, actionPerformerId);
            }

            dc.SubmitChanges();
            this.Id = dalAddress.Id;
        }
开发者ID:esegura,项目名称:CustomerManagement,代码行数:21,代码来源:Address.cs

示例7: Delete

 internal static void Delete(DAL.CustomersDataContext dc, Address item)
 {
     DAL.Address dalAddress = dc.Addresses.Where(a => a.Id == item.Id).Where(a => !a.Deleted).Single();
     dalAddress.Deleted = true;
     dc.SubmitChanges();
 }
开发者ID:esegura,项目名称:CustomerManagement,代码行数:6,代码来源:Address.cs

示例8: SaveDependent

        internal void SaveDependent(DAL.CustomersDataContext dc)
        {
            DAL.PaymentType dalPaymentType = null;

            if (this.Id == 0)
            {
                dalPaymentType = new DAL.PaymentType();
                map(dc, this, dalPaymentType);
                dc.PaymentTypes.InsertOnSubmit(dalPaymentType);
            }
            else
            {
                dalPaymentType = findRecord(dc, this.Id);
                map(dc, this, dalPaymentType);
            }

            dc.SubmitChanges();
            this.Id = dalPaymentType.Id;
        }
开发者ID:esegura,项目名称:CustomerManagement,代码行数:19,代码来源:PaymentType.cs

示例9: Delete

        internal static void Delete(DAL.CustomersDataContext dc, PaymentTransaction item)
        {
            DAL.PaymentTransaction dalPaymentTransaction = findRecord(dc, item.Id);
            dalPaymentTransaction.Deleted = true;
            dc.SubmitChanges();

            PaymentType.Delete(dc, item.PaymentType);
            PaymentStatusCode.Delete(dc, item.PaymentStatusCode);
        }
开发者ID:esegura,项目名称:CustomerManagement,代码行数:9,代码来源:PaymentTransaction.cs


注:本文中的DAL.SubmitChanges方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。