示例#1
0
        public async Task <int> AddCompanyUserAsync(VcCompInfo scCompInfo, VcUsrInfo scUsr, SHUSER_SyUser syUser)
        {
            //var rstScUsr = scUsrRespository.Insert(scUsr);
            //scCompInfo.
            var rstScCompInfo = scCompInfoRespository.Insert(scCompInfo);      // vcCompInfoRepository

            //var rstSyUser = syUserRespository.Insert(syUser);

            //if (rstScCompInfo == null || rstSyUser != 1)
            //{
            //    return -1;
            //}

            if (rstScCompInfo == null)
            {
                return(-1);
            }

            var rst = await SaveDbContextAsync();

            return(rst);
            //if (rst != 1)
            //    return rst;

            //return await SaveDareDbContextAsync();
        }
        public async Task <int> AddMentorAsync(ScCompInfo scCompInfo)
        {
            //var rstScUsr = scUsrRespository.Insert(scUsr);
            //scCompInfo.
            var rstScCompInfo = scCompInfoRespository.Insert(scCompInfo);

            if (rstScCompInfo == null)
            {
                return(-1);
            }
            return(await SaveDbContextAsync());
        }