public async Task AddBuildOrder(int userId, User.UserBuildOrder buildOrder) { var user = await _context.Users .Include(x => x.UserBuildOrders) .SingleAsync(x => x.Id == userId); user.UserBuildOrders.Add(buildOrder); await _context.SaveChangesAsync(); }
public async Task AddBuildOrder(int userId, BuildOrderParams orderParams) { var build = await _pcPartsRepository.GetBuildByIdAsync(orderParams.BuildId); var userBuildOrder = new User.UserBuildOrder { UserId = userId, BuildId = build.Id, Price = build.Price, }; await _userRepository.AddBuildOrder(userId, userBuildOrder); }
public Task AddBuildOrder(int userId, User.UserBuildOrder buildOrder) { throw new System.NotImplementedException(); }