Example #1
0
        public void create(Task task)
        {
            var entity = new Task()
            {
                Name          = task.Name,
                Description   = task.Description,
                Executiondate = task.Executiondate,
                Project       = task.Project,
                State         = "En Proceso"
            };

            DbContext.Tasks.Add(entity);
            DbContext.SaveChanges();
        }
Example #2
0
        public void create(User User)
        {
            var entity = new User()
            {
                Username = User.Username,
                Password = User.Password,
                Role     = "Operador",
                Enable   = User.Enable,
                Email    = User.Email
            };

            DbContext.Users.Add(entity);
            DbContext.SaveChanges();
        }
Example #3
0
        public void create(Project project)
        {
            var entity = new Project()
            {
                Name        = project.Name,
                Description = project.Description,
                Initdate    = project.Initdate,
                Finishdate  = project.Finishdate,
                State       = "En Proceso"
            };

            DbContext.Projects.Add(entity);
            DbContext.SaveChanges();
        }