1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 17:23:18 +00:00

sync and display attachments on view login

This commit is contained in:
Kyle Spearrin
2017-07-12 16:23:24 -04:00
parent 18a86d3f12
commit 0a7ad44d23
15 changed files with 169 additions and 5 deletions

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Bit.App.Abstractions;
using Bit.App.Models.Data;
namespace Bit.App.Repositories
{
public class AttachmentRepository : Repository<AttachmentData, string>, IAttachmentRepository
{
public AttachmentRepository(ISqlService sqlService)
: base(sqlService)
{ }
public Task<IEnumerable<AttachmentData>> GetAllByLoginIdAsync(string loginId)
{
var attachments = Connection.Table<AttachmentData>().Where(a => a.LoginId == loginId).Cast<AttachmentData>();
return Task.FromResult(attachments);
}
}
}