public void AddUser(Library.User user) { User u = Mapper.Map(user); u.DefaultLocation = db.Location.Find(user.DefaultLocation.LocationId); db.Add(u); db.SaveChanges(); user.UserId = u.UserId; }
//Persisting changes to database public void Save() { s_logger.Info("Saving changes to the database"); _dbContext.SaveChanges(); }