public Models.Command GetById(int id)
 {
     Models.Command foundedCommand =
         commands
         .Where(current => current.Id == id)
         .FirstOrDefault();
     return(foundedCommand);
 }
Ejemplo n.º 2
0
        public async System.Threading.Tasks.Task <Models.Command> GetByIdAsync(int Id)
        {
            Models.Command foundedCommand = null;
            await System.Threading.Tasks.Task.Run(() =>
            {
                foundedCommand =
                    Commands.Where(current => current.Id == Id)
                    .FirstOrDefault();
            });

            return(foundedCommand);
        }