public HomeController(IConfiguration configuration)
 {
     _configuration              = configuration;
     _cardHelper                 = new CardHelper(_configuration);
     _taskDataRepository         = new TaskDataRepository(_configuration);
     _taskAttachementsRepository = new TaskAttachementsRepository(_configuration);
     _taskActivityRepository     = new TaskActivityRepository(_configuration);
 }
Ejemplo n.º 2
0
        public static async Task SaveTaskAttachements(TaskInfo taskInfo, IConfiguration configuration)
        {
            TaskAttachementsRepository taskAttachementsRepository = new TaskAttachementsRepository(configuration);
            var rowKey = Guid.NewGuid();

            TaskAttachementsEntity taskAttachementsEntity = new TaskAttachementsEntity
            {
                PartitionKey   = PartitionKeyNames.TaskAttachementsDataTable.TaskAttachementsDataPartition,
                RowKey         = rowKey.ToString(),
                AttachementID  = taskInfo.attachementID,
                TaskID         = taskInfo.taskID,
                AttachementURL = taskInfo.attachementURL
            };

            await taskAttachementsRepository.CreateOrUpdateAsync(taskAttachementsEntity);
        }