using EntityFramwork.Factories; using Model; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EntityFramwork.Manager { public class ManagerSkins : ISkinsManager { public Task AddItem(Skin? item) { throw new NotImplementedException(); } public Task DeleteItem(Skin? item) { throw new NotImplementedException(); } public Task> GetItems(int index, int count, string? orderingPropertyName = null, bool descending = false) { throw new NotImplementedException(); } public Task> GetItemsByChampion(Champion? champion, int index, int count, string? orderingPropertyName = null, bool descending = false) { IEnumerable items = new List(); using (BDDContext db = new BDDContext()) { int idChampions = db.Champions.Where( e => e.Name == champion.Name).FirstOrDefault().Id; items = db.Skins.Where(e => e.ChampionId == idChampions).Skip(index).Take(count).Select(e => e.SkinEntityToModele()).ToList(); } return Task.FromResult(items); } public Task> GetItemsByName(string substring, int index, int count, string? orderingPropertyName = null, bool descending = false) { throw new NotImplementedException(); } public Task GetNbItems() { throw new NotImplementedException(); } public Task GetNbItemsByChampion(Champion? champion) { throw new NotImplementedException(); } public Task GetNbItemsByName(string substring) { throw new NotImplementedException(); } public Task UpdateItem(Skin? oldItem, Skin? newItem) { throw new NotImplementedException(); } } }