public async Task <IActionResult> OrderBySomething(ProBasket catalog, object criterio, CancellationToken cancellation) { var query = new OrderBySomething(catalog, criterio); var result = await mediator.Send(query); return(View(result)); }
public async Task <ProBasket> Create(ProBasket entity) { await command.proBaskets.AddAsync(entity); await command.SaveChangesAsync(); return(entity); }
public async Task <IActionResult> Create(ProBasket catalog, CancellationToken cancellation) { var command = new CreateProBasket(catalog); var result = await mediator.Send(command); if (result != null) { return(Ok(result)); } return(BadRequest("Try again")); }
public async Task UpdateById(ProBasket entity, uint id) { command.proBaskets.Attach(entity); command.Update(id); await command.SaveChangesAsync(); }
public async Task Update(ProBasket entity) { command.proBaskets.Update(entity); await command.SaveChangesAsync(); }
public IEnumerable <ProBasket> OrderByCriterio(ProBasket entity, object y) { return(command.proBaskets.OrderBy(x => entity.GetType().GetProperties() == y)); }
public async Task Delete(ProBasket entity) { command.proBaskets.Remove(entity); await command.SaveChangesAsync(); }
public async Task <int> Count(ProBasket entity) { var read = await ReadAll(entity => true); return(read.Count()); }
public DeleteProBasketById(ProBasket catalog, uint id) { this.catalog = catalog; this.id = id; }
public CountProBasket(ProBasket catalog) { this.catalog = catalog; }
public UpdateProBasketById(uint id, ProBasket item) { this.id = id; this.item = item; }
public ProBasketDto(ProBasket basket) { this.id = basket.id; this.basketItems = basket.basketItems; }
public CreateProBasket(ProBasket catalog) { this.catalog = catalog; }
public OrderBySomething(ProBasket items, object criterio) { this.items = items; this.criterio = criterio; }