Example #1
0
        public static List <DTO.ContactDTO> GetPost()
        {
            var db         = new FeedbackEntities();
            var feedbacks  = db.Feedbacks.ToList();
            var ContactDTO = convertToDTO(feedbacks);

            return(ContactDTO);
        }
Example #2
0
        public static void SaveContactForm(Blog.DTO.ContactDTO contactDTO)
        {
            var db = new FeedbackEntities();

            var newContactPost = convertToEntity(contactDTO);

            db.Feedbacks.Add(newContactPost);
            db.SaveChanges();
        }