Ejemplo n.º 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);
            }
        }
        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);
            }
        }
        //=====================================================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);
        }