Esempio n. 1
0
        public async Task <Noticias> BuscarNoticia(Noticias noticiaParaBuscar)
        {
            using (SportsGoEntities context = new SportsGoEntities(false))
            {
                NoticiasRepository noticiaRepo    = new NoticiasRepository(context);
                Noticias           noticiaBuscada = await noticiaRepo.BuscarNoticia(noticiaParaBuscar);

                if (noticiaBuscada != null)
                {
                    DateTimeHelperNoPortable helper = new DateTimeHelperNoPortable();
                    noticiaBuscada.Creacion = helper.ConvertDateTimeFromAnotherTimeZone(noticiaParaBuscar.ZonaHorariaGMTBase, helper.DifferenceBetweenGMTAndLocalTimeZone, noticiaBuscada.Creacion);
                }

                return(noticiaBuscada);
            }
        }