1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 07:43:37 +00:00
Files
mobile/src/App/Repositories/AttachmentRepository.cs
2017-07-12 16:23:24 -04:00

23 lines
682 B
C#

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);
}
}
}