Exemple #1
0
 public async Task <Guid> CreateAsync(SchedulerAppointmentEntity entity)
 {
     if (await _schedulerAppointmentRepository.AddAsync(entity))
     {
         return(entity.Id);
     }
     return(Guid.Empty);
 }
Exemple #2
0
        public async Task <bool> UpdateAsync(SchedulerAppointmentEntity entity)
        {
            var sql = $@"update scheduler_appointment
                            set task_id = @TaskId, task_name = @TaskName, price = @Price, user_id = @UserId
                                , ""start"" = @Start, ""end"" = @End, recurrence_id = @RecurrenceId, recurrence_rule = @RecurrenceRule
                                , recurrence_exception = @RecurrenceException
                                , is_all_day = @IsAllDay, is_off = @IsOff, updated_at=now(), notes = @Notes
                        where id = @Id";

            return(await _dbContext.ExecuteAsync <bool>(sql, entity));
        }
Exemple #3
0
        public async Task <bool> AddAsync(SchedulerAppointmentEntity entity)
        {
            var sql = $@"insert into scheduler_appointment 
                                (id, task_id, task_name, price, user_id
                                , ""start"", ""end"", recurrence_id, recurrence_rule, recurrence_exception
                                , is_all_day, is_off, notes) 
                        values(@Id, @TaskId, @TaskName, @price, @UserId
                                , @Start, @End, @RecurrenceId, @RecurrenceRule, @RecurrenceException
                                , @IsAllDay, @IsOff, @Notes);";

            return(await _dbContext.ExecuteAsync <bool>(sql, entity));
        }
Exemple #4
0
 public async Task <bool> UpdateAsync(SchedulerAppointmentEntity entity)
 {
     return(await _schedulerAppointmentRepository.UpdateAsync(entity));
 }