Пример #1
0
 public DocumentType[] GetAllDocumentType()
 {
     try
     {
         using (var c = new Connect())
         {
             SqlConnection sqlconn           = c.GetConnection();
             var           mapper            = new DocumentTypeDataMapper(sqlconn);
             IEnumerable <DocumentType> list = mapper.GetAll();
             return(list.ToArray());
         }
     }
     catch (Exception exception)
     {
         throw new FaultException <ServerError>(new ServerError());
     }
 }
Пример #2
0
 public DocumentType[] GetAllDocumentType()
 {
     try
     {
         using (var c = new Connect())
         {
             SqlConnection sqlconn = c.GetConnection();
             var mapper = new DocumentTypeDataMapper(sqlconn);
             IEnumerable<DocumentType> list = mapper.GetAll();
             return list.ToArray();
         }
     }
     catch (Exception exception)
     {
         throw new FaultException<ServerError>(new ServerError());
     }
 }