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