...
This commit is contained in:
@@ -70,5 +70,18 @@ namespace Back.Services
|
||||
{
|
||||
return await _repoOrder.UpdateAsync(order);
|
||||
}
|
||||
public async Task<int> AddOrder(Order order)
|
||||
{
|
||||
try
|
||||
{
|
||||
var item = await _repoOrder.AddAsync(order);
|
||||
return item.ID;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return -1;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -37,5 +37,11 @@ namespace Back.Services
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
}
|
||||
public async Task<Promotion> GetByPromotionID(int PromotionID)
|
||||
{
|
||||
return await _repoPromotion.Get(w => w.Status && w.ID == PromotionID)
|
||||
.Include(inc => inc.PromotionDetails).ThenInclude(tinc => tinc.Permission)
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user