示例#1
0
        public async Task <bool> DeleteUserAction(long ActionId, long UserId)
        {
            UserInitiativeAction record = new UserInitiativeAction
            {
                UserId             = UserId,
                InitiativeActionId = ActionId
            };

            InitiativeContext.UserInitiativeActions.Remove(record);
            return(await InitiativeContext.SaveChangesAsync() > 0);
        }
示例#2
0
        public async Task <IActionResult> CreateUserAction(UserInitiativeAction data)
        {
            var response = await UserInitiativeActionRepository.CreateUserAction(data);

            return(Ok(response));
        }
示例#3
0
        public async Task <bool> CreateUserAction(UserInitiativeAction record)
        {
            await InitiativeContext.UserInitiativeActions.AddAsync(record);

            return(await InitiativeContext.SaveChangesAsync() > 0);
        }