Example #1
0
        public void AddUser(User userToAdd)
        {
            if (userToAdd == null)
            {
                throw new ArgumentNullException(nameof(userToAdd));
            }

            _context.Add(userToAdd);
        }
        public void AddMedia(Media mediaToAdd)
        {
            if (mediaToAdd == null)
            {
                throw new ArgumentNullException(nameof(mediaToAdd));
            }

            _context.Add(mediaToAdd);
        }
Example #3
0
        bool InterfaceMedia.AddMedia(string path, DateTime creationDate, Event ev, bool isVideo, string note, int rating, List <Person> people, Scenary scenary)
        {
            MediasContext medias = new MediasContext();

            return(medias.Add(path, creationDate, ev, isVideo, note, rating, people, scenary));
        }