COmpletata prima review Starred Softkey

This commit is contained in:
Samuele Locatelli
2020-07-14 14:32:58 +02:00
parent c5fea9fa43
commit 3801b9ba0e
4 changed files with 19 additions and 0 deletions
@@ -76,6 +76,21 @@ namespace Thermo.Active.Database.Controllers
.ToList();
}
public List<DTOUserSoftKeyConfigModel> GetStarredSoftkeys(int userId)
{
// Find user softkey stored in the database
List<FavoriteUserSoftkeyModel> favoriteKey = FindUserFavoriteSoftkeys(userId);
// Get config
List<DTOUserSoftKeyConfigModel> userSoftkey = GetUserSoftkeyConfig();
return userSoftkey
.Where(x =>
favoriteKey.Any(y => y.SoftkeyId == x.Id
))
.ToList();
}
public List<DTOUserSoftKeyConfigModel> InsertUserSoftkeyModel(List<uint> softKeyIds, int userId)
{
List<FavoriteUserSoftkeyModel> softKeys = new List<FavoriteUserSoftkeyModel>();