Example #1
0
        public JsonResult Create(string name, string description)
        {
            var project = new Project
            {
                Name = name,
                Description = description
            };
            _projectRepository.CreateNewProject(project);

            var data = new { isOk = true, errorMessage = "Entry not added." };
            return new JsonResult { Data = data };
        }
Example #2
0
 public void CreateNewProject(Project project)
 {
     var loggedInUserId = UserSession.LoggedInUser.UserId.ToString();
     using(var model = new fundgridEntities())
     {
         var newProject = new Fundgrid.Data.project()
                         {
                             name = project.Name,
                             description = project.Description,
                             owner_id = loggedInUserId,
                         };
         model.projects.Add(newProject);
         model.SaveChanges();
     }
 }
 public void CreateNewProject(Project project)
 {
     throw new NotImplementedException();
 }