Esempio n. 1
0
        public static async Task <UserMarriedTo> GetEntryAsync(MikiContext context, long receiver, long asker)
        {
            UserMarriedTo m = null;

            m = await context.UsersMarriedTo
                .Include(x => x.Marriage).FirstOrDefaultAsync(x => (x.AskerId == asker && x.ReceiverId == receiver) || (x.AskerId == receiver && x.ReceiverId == asker));

            return(m);
        }
Esempio n. 2
0
        public static async Task <UserMarriedTo> GetMarriageAsync(MikiContext context, long receiver, long asker)
        {
            UserMarriedTo m = null;

            m = await InternalGetMarriageAsync(context, receiver, asker);

            if (m == null)
            {
                m = await InternalGetMarriageAsync(context, asker, receiver);
            }
            return(m);
        }