Skip to content

Commit dcdbe58

Browse files
committed
Restructure + Refactor
1 parent f05bff0 commit dcdbe58

File tree

65 files changed

+210
-263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+210
-263
lines changed

src/StackAPI/App_Data/db.sqlite

-440 KB
Binary file not shown.

src/StackAPI/StackAPI.Questions.ServiceInterface/MyServices.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/StackAPI/StackAPI.Questions.ServiceModel/GetAnswer.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/StackAPI/StackAPI.Questions.ServiceModel/packages.config

Lines changed: 0 additions & 6 deletions
This file was deleted.
-1.1 MB
Binary file not shown.
-971 KB
Binary file not shown.
-441 KB
Binary file not shown.
-1.1 MB
Binary file not shown.
-971 KB
Binary file not shown.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Linq;
2+
using ServiceStack;
3+
using ServiceStack.OrmLite;
4+
using StackApis.ServiceModel;
5+
using StackApis.ServiceModel.Types;
6+
7+
namespace StackApis.ServiceInterface
8+
{
9+
public class MyServices : Service
10+
{
11+
public object Get(SearchQuestions request)
12+
{
13+
var query = Db.From<Question>();
14+
15+
if (request.Tags != null && request.Tags.Length > 0)
16+
{
17+
query.Join<QuestionTag>((q, t) => q.QuestionId == t.QuestionId)
18+
.Where<QuestionTag>(x => Sql.In(x.Tag, request.Tags));
19+
}
20+
21+
var response = new SearchQuestionsResponse {
22+
Results = Db.Select(query)
23+
};
24+
25+
return response;
26+
}
27+
28+
public object Get(GetAnswers request)
29+
{
30+
return new GetAnswersResponse
31+
{
32+
Ansnwer = Db.Single<Answer>(x => x.QuestionId == request.QuestionId)
33+
};
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)