This commit is contained in:
mmrbnjd
2024-07-28 17:31:40 +03:30
parent 5665b91aa1
commit acab592172
5 changed files with 194 additions and 6 deletions

View File

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

View File

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