AppActs.API.DataMapper.EventMapper.GetDeviceAppLastScreenOneBy C# (CSharp) Method

GetDeviceAppLastScreenOneBy() public method

public GetDeviceAppLastScreenOneBy ( System.Guid deviceId, System.Guid applicationId ) : DeviceAppLastScreen
deviceId System.Guid
applicationId System.Guid
return AppActs.API.Model.Event.DeviceAppLastScreen
        public DeviceAppLastScreen GetDeviceAppLastScreenOneBy(Guid deviceId, Guid applicationId)
        {
            try
            {
                IMongoQuery query = Query.And
                    (
                        Query<DeviceAppLastScreen>.EQ<Guid>(mem => mem.DeviceId, deviceId),
                        Query<DeviceAppLastScreen>.EQ<Guid>(mem => mem.ApplicationId, applicationId)
                    );

                return this.GetCollection<DeviceAppLastScreen>().FindOne(query);
            }
            catch (Exception ex)
            {
                throw new DataAccessLayerException(ex);
            }
        }