示例#1
0
        public Document[] GetAllDocumentPerson(int idperson)
        {
            try
            {
                using (var c = new Connect())
                {
                    SqlConnection sqlconn = c.GetConnection();

                    var mapper = new DocumentDataMapper(sqlconn);
                    IEnumerable <Document> list = mapper.GetAll().Where(d => d.Person.Id == idperson);
                    return(list.ToArray());
                }
            }
            catch (Exception exception)
            {
                throw new FaultException <ServerError>(new ServerError());
            }
        }
示例#2
0
        public Document[] GetAllDocumentPerson(int idperson)
        {
            try
            {
                using (var c = new Connect())
                {
                    SqlConnection sqlconn = c.GetConnection();

                    var mapper = new DocumentDataMapper(sqlconn);
                    IEnumerable<Document> list = mapper.GetAll().Where(d => d.Person.Id == idperson);
                    return list.ToArray();
                }
            }
            catch (Exception exception)
            {
                throw new FaultException<ServerError>(new ServerError());
            }
        }