Ejemplo n.º 1
0
        public Task <bool> DeletePersonAsync(int personId)
        {
            bool isDeleted         = false;
            var  personToBeDeleted = PersonsDB.FirstOrDefault(i => i.Id == personId);

            if (personToBeDeleted != null)
            {
                PersonsDB.Remove(personToBeDeleted);
                isDeleted = true;
            }
            return(Task.FromResult(isDeleted));
        }
Ejemplo n.º 2
0
        public Task <Person> GetPersonDetailsAsync(int personId)
        {
            var person = PersonsDB.FirstOrDefault(i => i.Id == personId);

            return(Task.FromResult(person));
        }