Controller cleanup (#30)
* Cleaning up routes. * Adding signout functionality * Added simple checkout behavior
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
using ApplicationCore.Interfaces;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using Infrastructure.Data;
|
||||
using System.Linq;
|
||||
using Microsoft.eShopWeb.ViewModels;
|
||||
using System.Collections.Generic;
|
||||
@@ -82,5 +80,14 @@ namespace Web.Services
|
||||
|
||||
_basketRepository.Update(basket);
|
||||
}
|
||||
|
||||
public async Task Checkout(int basketId)
|
||||
{
|
||||
var basket = _basketRepository.GetById(basketId);
|
||||
|
||||
// TODO: Actually Process the order
|
||||
|
||||
_basketRepository.Delete(basket);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user