public async Task <IProjectFollowData> DeleteAsync(string userId, string projectId) { var partitionKey = ProjectFollowEntity.GeneratePartitionKey(); var rowKey = ProjectFollowEntity.GenerateRowKey(projectId, userId); return(await _projectFollowTableStorage.DeleteAsync(partitionKey, rowKey)); }
public static ProjectFollowEntity Create(string userId, string fullName, string projectId) { var id = GenerateRowKey(projectId, userId); var result = new ProjectFollowEntity { PartitionKey = GeneratePartitionKey(), RowKey = id, Id = id, FullName = fullName, UserId = userId, ProjectId = projectId }; return(result); }
public static ProjectFollowEntity Create(IProjectFollowData src) { var id = GenerateRowKey(src.ProjectId, src.UserId); var result = new ProjectFollowEntity { PartitionKey = GeneratePartitionKey(), RowKey = id, Id = id, FullName = src.FullName, UserId = src.UserId, ProjectId = src.ProjectId, UserAgent = src.UserAgent }; return(result); }
public async Task <IEnumerable <IProjectFollowData> > GetFollowAsync() { var partitionKey = ProjectFollowEntity.GeneratePartitionKey(); return(await _projectFollowTableStorage.GetDataAsync(partitionKey)); }
public async Task SaveAsync(IProjectFollowData projectFollowData) { var newEntity = ProjectFollowEntity.Create(projectFollowData); await _projectFollowTableStorage.InsertAsync(newEntity); }
public async Task SaveAsync(string userId, string fullName, string projectId) { var newEntity = ProjectFollowEntity.Create(userId, fullName, projectId); await _projectFollowTableStorage.InsertAsync(newEntity); }