예제 #1
0
        public Student AddStudent()
        {
            Student student      = new Student();
            Student studentAdded = studentBL.Add(student);

            return(studentAdded);
        }
예제 #2
0
        public IActionResult Add(Car car)
        {
            var result = _manager.Add(car);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
예제 #3
0
 public int Add(int a, int b)
 {
     //1 2
     //-1 4
     //-8 -9
     if (a > 4)
     {
         return(_business.Add(a, b));
     }
     else
     {
         return(a + b);
     }
 }
예제 #4
0
 public virtual long Add(T_vw obj)
 {
     return(_baseBusiness.Add(Resolve(obj)));
 }
        public async Task <IActionResult> Post([Required] ProjectViewModel projectViewModel)
        {
            await _projectBusiness.Add(projectViewModel);

            return(StatusCode((int)HttpStatusCode.Created));
        }
예제 #6
0
        public async Task <IActionResult> Post([Required] UserViewModel userViewModel)
        {
            await _userBusiness.Add(userViewModel);

            return(StatusCode((int)HttpStatusCode.Created));
        }
예제 #7
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Model.business model)
 {
     return(dal.Add(model));
 }