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

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

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Example #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);
     }
 }
Example #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));
        }
        public async Task <IActionResult> Post([Required] UserViewModel userViewModel)
        {
            await _userBusiness.Add(userViewModel);

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