Example #1
0
        public override string Save_Wallpaper(RewardsDTO adto)
        {
            string msg = "";

            using (var context = new PHCEntities())
            {
                try
                {
                    Wallpaper bg = new Wallpaper();
                    bg.Title     = adto.Title;
                    bg.WallImage = adto.WallImage;

                    context.AddToWallpapers(bg);
                    context.SaveChanges();
                    msg = "success";
                }
                catch (Exception ex)
                {
                    msg = ex.Message;
                }
                return(msg);
            }
        }