// GET: Avatar/Create

        public ActionResult Create()
        {
            AvatarCreateVM ViewModel = new AvatarCreateVM();

            ViewModel.AvatarBackgrounds = ServiceBackground.GetBackgrounds();
            ViewModel.AvatarHairs       = ServiceHair.GetHairs();
            ViewModel.AvatarBodys       = ServiceBody.GetBodys();
            ViewModel.AvatarClothings   = ServiceClothing.GetClothings();
            return(View(ViewModel));
        }
        public ActionResult Create(AvatarCreateVM ViewModel)
        {
            if (ModelState.IsValid)
            {
                ViewModel.Avatar = new Avatar();
                ViewModel.Avatar.BackgroundFK = ViewModel.SelectedBackgroundID;
                ViewModel.Avatar.HairFK       = ViewModel.SelectedHairID;
                ViewModel.Avatar.BodyFK       = ViewModel.SelectedBodyID;
                ViewModel.Avatar.ClothingFK   = ViewModel.SelectedClothingID;


                ServiceAvatar.CreateAvatar(ViewModel.Avatar);
                return(View(ServiceAvatar.GetAvatars()));
            }
            ViewModel.AvatarBackgrounds = ServiceBackground.GetBackgrounds();
            ViewModel.AvatarHairs       = ServiceHair.GetHairs();
            ViewModel.AvatarBodys       = ServiceBody.GetBodys();
            ViewModel.AvatarClothings   = ServiceClothing.GetClothings();
            return(View(ServiceAvatar.GetAvatars()));
        }