public Task <TesoroUser> GetTreasure(Guid Tid) { TesoroUser treasure = db.Tesoros .Where(t => t.Id.Equals(Tid)).FirstOrDefault(); return(Task.FromResult(treasure)); }
public Task <bool> SetTreasure(TesoroUser T) { bool status = false; try{ db.Tesoros.Add(T); db.SaveChanges(); status = true; }catch (Exception e) { status = false; Console.WriteLine(e.Message); } return(Task.FromResult(status)); }