Ejemplo n.º 1
0
        public async Task <bool> RemoveAsync(string id)
        {
            using var context = new SMySQLContext();
            var e = context.CompanyAdminUsers.SingleOrDefault(x => x.Id == id);

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

            return(true);
        }
        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);
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Remove(string id)
        {
            using (var context = new SMySQLContext()) {
                ECompany eCompany = context.Companies.SingleOrDefault(x => x.id == id);
                if (eCompany == null)
                {
                    return(Ok(false));
                }
                context.Remove(eCompany);
                await context.SaveChangesAsync();

                return(Ok(true));
            }
        }
        static public async Task <bool> Remove(string id)
        {
            using var context = new SMySQLContext();
            EDeliveryOrder eOrder = context.DeliveryOrders.SingleOrDefault(x => x.id == id);

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

            return(true);
        }
        static public async Task <bool> Remove(string id)
        {
            using (var context = new SMySQLContext()) {
                EDeliveryProductCategory eCategory = context.DeliveryProductCategories.SingleOrDefault(x => x.id == id);
                if (eCategory == null)
                {
                    return(false);
                }
                context.Remove(eCategory);
                await context.SaveChangesAsync();

                return(true);
            }
        }
Ejemplo n.º 6
0
        static public async Task <bool> Remove(string id)
        {
            using (var context = new SMySQLContext()) {
                ELogisticsDriverIncident eCompanyProposal = context.LogisticsDriverIncidents.SingleOrDefault(x => x.id == id);
                if (eCompanyProposal == null)
                {
                    return(false);
                }
                context.Remove(eCompanyProposal);
                await context.SaveChangesAsync();

                return(true);
            }
        }