public AudioLink AddAudioLink(string link, User foundBy, string description) { MongoCollection<AudioLink> links = db.GetCollection<AudioLink>("AudioLinks"); AudioLink toInsert = new AudioLink(link, description, foundBy.UserName); links.Insert(toInsert); return toInsert; }
public ImageLink AddImageLink(string link, User foundBy, string description) { MongoCollection<ImageLink> links = db.GetCollection<ImageLink>("ImageLinks"); ImageLink toInsert = new ImageLink(link, description, foundBy.UserName); links.Insert(toInsert); return toInsert; }
public Experience(List<AudioLink> audio, ImageLink visual, User createdBy, string description, bool share) { Creator = createdBy; Sounds = audio ?? new List<AudioLink>(); Visuals = visual; Description = description; Share = share; }
public ActionResult ReturningUser(User user) { User setUser = dal.PerformLogin(user.Email, user.PasswordHash); if (setUser != null) { // login success! CurrentUser = setUser; return RedirectToAction("Welcome"); } else { return RedirectToAction("Login"); } }
public ImageLink AddImageLink(string link, User foundBy, string description) { ImageLink toInsert = new ImageLink(link, description, foundBy.UserName); imageLinks.Add(toInsert); return toInsert; }
public void AddExperience(List<AudioLink> audioLinks, ImageLink imageLink, User builtBy, string description, bool share) { Experience newExp = new Experience(audioLinks, imageLink, builtBy, description, share); experienceList.Add(newExp); }
public AudioLink AddAudioLink(string link, User foundBy, string description) { AudioLink toInsert = new AudioLink(link, description, foundBy.UserName); audioLinks.Add(toInsert); return toInsert; }
public void CreateNewUser(string userName, string email, string password) { User toSave = new User(userName, securityLayer.EncryptPassword(password), email); MongoCollection<User> users = db.GetCollection<User>("Users"); users.Insert(toSave); }
public void AddExperience(List<AudioLink> audioLinks, ImageLink imageLink, User builtBy, string description, bool share) { MongoCollection<ShortExperience> links = db.GetCollection<ShortExperience>("Experiences"); ShortExperience dehydratedExperience = new ShortExperience(new Experience(audioLinks, imageLink, builtBy, description, share)); links.Insert(dehydratedExperience); }
public ActionResult NewUser(User user) { dal.CreateNewUser(user.UserName, user.Email, user.PasswordHash); CurrentUser = dal.PerformLogin(user.Email, user.PasswordHash); return View("Welcome", CurrentUser); }
public ImageLink AddImageLink(string link, User foundBy, string description) { return internalDal.AddImageLink(link, foundBy, description); }
public void AddExperience(List<AudioLink> audioLinks, ImageLink imageLink, User builtBy, string description, bool share) { internalDal.AddExperience(audioLinks, imageLink, builtBy, description, share); }