Example #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);
        }
Example #2
0
        public async Task <IActionResult> CreateUserAction(UserInitiativeAction data)
        {
            var response = await UserInitiativeActionRepository.CreateUserAction(data);

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

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