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); }
public async Task <IActionResult> CreateUserAction(UserInitiativeAction data) { var response = await UserInitiativeActionRepository.CreateUserAction(data); return(Ok(response)); }
public async Task <bool> CreateUserAction(UserInitiativeAction record) { await InitiativeContext.UserInitiativeActions.AddAsync(record); return(await InitiativeContext.SaveChangesAsync() > 0); }