public GenericResponse <List <StaticPage> > GetAllStaticPage()
        {
            GenericResponse <List <StaticPage> > response = new GenericResponse <List <StaticPage> >();

            response.Payload = repo.GetAll().ToList();

            if (response.Payload != null && response.Payload.Count > 0)
            {
                response.Success = true;
            }
            else
            {
                response.Success = false;
                response.Message = "ERROR : Static Pages unable to load from database.";
            }

            return(response);
        }
Beispiel #2
0
        public List <Post> GetAllPost()
        {
            var all = repo.GetAll();

            return(all.ToList());
        }