Controller cleanup (#30)

* Cleaning up routes.

* Adding signout functionality

* Added simple checkout behavior
This commit is contained in:
Steve Smith
2017-08-07 14:12:48 -04:00
committed by GitHub
parent 4385c2f291
commit 97ef1c79a0
10 changed files with 125 additions and 86 deletions

View File

@@ -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);
}
}
}