Example #1
0
        public static List <AuditUser> GetAudits(string filter)
        {
            List <AuditUser> audits = new List <AuditUser>();

            if (!string.IsNullOrEmpty(filter))
            {
                using (FreeMarketEntities db = new FreeMarketEntities())
                {
                    audits = db.FilterAuditUser(filter).Select(c => new AuditUser
                    {
                        Action            = (short)c.Action,
                        DateTime          = (DateTime)c.DateTime,
                        Identity          = c.Identity,
                        ActionNumber      = (long)c.ActionNumber,
                        Parameters        = c.Parameters,
                        ActionDescription = c.ActionDescription
                    })
                             .ToList();
                }
            }
            else
            {
                audits = new List <AuditUser>();
            }

            return(audits);
        }