コード例 #1
0
        static public async Task <bool> Remove(string id)
        {
            using (var context = new SMySQLContext()) {
                EBaseEntity eBaseEntity = context.BaseUsers.SingleOrDefault(x => x.id == id);
                if (eBaseEntity == null)
                {
                    return(false);
                }
                context.Remove(eBaseEntity);
                await context.SaveChangesAsync();

                return(true);
            }
        }
コード例 #2
0
        static public async Task <bool> Remove(string id)
        {
            using (var context = new SMySQLContext()) {
                ECompanyBillToPay eBillToPay = context.CompanyBillsToPay.SingleOrDefault(x => x.id == id);
                if (eBillToPay == null)
                {
                    return(false);
                }
                context.Remove(eBillToPay);
                await context.SaveChangesAsync();

                return(true);
            }
        }
コード例 #3
0
        //=====================================================GETS ABOVE=====================================================

        #region Remove
        static public async Task <bool> Remove(string id)
        {
            using var context = new SMySQLContext();
            EDeliveryProduct eProduct = context.DeliveryProducts.SingleOrDefault(x => x.id == id);

            if (eProduct == null)
            {
                return(false);
            }
            context.Remove(eProduct);
            await context.SaveChangesAsync();

            return(true);
        }