//public IActionResult AddAdministrator(AddAdministratorViewModel model) //{ // if (!ModelState.IsValid) // { // return RedirectToAction("Index"); // } // else // { // byte[] passwordHash, passwordSalt; // HashingHelper.CreatePasswordHash(model.Password, out passwordHash, out passwordSalt); // var result = new GoF.Lib.Entities.Concrete.Admin() // { // FirstName = model.Name, // LastName = model.Lastname, // PasswordHash = passwordHash, // PasswordSalt = passwordSalt, // UserName = model.Username, // About = model.About, // Email = model.Email // }; // _adminService.Add(result); // return RedirectToAction("Administrators"); // } //} public JsonResult AddSocialMedia(string link, string logo, int adminId) { var model = new SocialMedia { AdminId = adminId, Link = link, LogoClass = logo }; _socialMediaService.Add(model); return(Json(1)); }