Exemple #1
0
        /// <summary>
        /// The Add
        /// </summary>
        /// <param name="project">The project<see cref="Project"/></param>
        public void Add(Project project)
        {
            //var newProject = Read(project.Id);

            //if (newProject != null)
            //{
            _db.Project.Add(project);
            _db.SaveChanges();
        }
Exemple #2
0
        /// <summary>
        /// The Add
        /// </summary>
        /// <param name="role">The role<see cref="Role"/></param>
        public void Add(Role role)
        {
            var id          = role.Id;
            var personExist = Read(id);

            if (personExist == null)
            {
                _db.Role.Add(role);
                _db.SaveChanges();
            }
        }
Exemple #3
0
        /// <summary>
        /// The Add
        /// </summary>
        /// <param name="person">The person<see cref="Person"/></param>
        public void Add(Person person)
        {
            var id          = person.Id;
            var personExist = Read(id);

            if (personExist == null)
            {
                _db.Person.Add(person);
                _db.SaveChanges();
            }
        }
Exemple #4
0
 /// <summary>
 /// The Create
 /// </summary>
 /// <param name="projectRole">The projectRole<see cref="ProjectRole"/></param>
 public void Create(ProjectRole projectRole)
 {
     _db.ProjectRole.Add(projectRole);
     _db.SaveChanges();
 }