[HttpPost]                                                           //getting info from Create view
        public ActionResult Create(Developer model, HttpPostedFileBase file) //to fill in the details
        {
            Developer developer = new Developer()
            {
                FirstName = model.FirstName,
                LastName  = model.LastName,
                FullName  = model.FirstName + " " + model.LastName,
                Position  = model.Position,
                Photo     = model.Photo,

                Email = model.Email,
                Id    = Guid.NewGuid().ToString(),
            };

            if (!ModelState.IsValid)
            {
                return(View(model));//stay on the current page
            }
            else
            {
                //from postedfile, dave profile picture
                if (file != null)
                {
                    developer.Photo = developer.FullName + Path.GetExtension(file.FileName);         //remane to always have a unique file reference
                    file.SaveAs(Server.MapPath("//Content//DeveloperProfiles//") + developer.Photo); //save the developer image into the DeveloperProfiles folder
                }

                context.Insert(developer);         //add developer to cache memory
                context.Commit();                  //refresh memory

                return(RedirectToAction("Index")); //redirect to Index page, to view the updated list
            }
        }