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()); } }
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()); } }