Skip to content

Commit 621618f

Browse files
committed
Added application layer and a simple service.
1 parent 6d8005e commit 621618f

File tree

16 files changed

+158
-28
lines changed

16 files changed

+158
-28
lines changed

AbpCompanyName.AbpProjectName.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AbpCompanyName.AbpProjectNa
1414
EndProject
1515
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AbpCompanyName.AbpProjectName.Core", "src\AbpCompanyName.AbpProjectName.Core\AbpCompanyName.AbpProjectName.Core.xproj", "{0FA75A5B-AB83-4FD0-B545-279774C01E87}"
1616
EndProject
17+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AbpCompanyName.AbpProjectName.Application", "src\AbpCompanyName.AbpProjectName.Application\AbpCompanyName.AbpProjectName.Application.xproj", "{3870C648-4AEA-4B85-BA3F-F2F63B96136A}"
18+
EndProject
1719
Global
1820
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1921
Debug|Any CPU = Debug|Any CPU
@@ -28,12 +30,17 @@ Global
2830
{0FA75A5B-AB83-4FD0-B545-279774C01E87}.Debug|Any CPU.Build.0 = Debug|Any CPU
2931
{0FA75A5B-AB83-4FD0-B545-279774C01E87}.Release|Any CPU.ActiveCfg = Release|Any CPU
3032
{0FA75A5B-AB83-4FD0-B545-279774C01E87}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{3870C648-4AEA-4B85-BA3F-F2F63B96136A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{3870C648-4AEA-4B85-BA3F-F2F63B96136A}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{3870C648-4AEA-4B85-BA3F-F2F63B96136A}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{3870C648-4AEA-4B85-BA3F-F2F63B96136A}.Release|Any CPU.Build.0 = Release|Any CPU
3137
EndGlobalSection
3238
GlobalSection(SolutionProperties) = preSolution
3339
HideSolutionNode = FALSE
3440
EndGlobalSection
3541
GlobalSection(NestedProjects) = preSolution
3642
{A2213374-BB48-48FD-BBD4-81E6A961D866} = {AFAA0841-BD93-466F-B8F4-FB4EEC86F1FC}
3743
{0FA75A5B-AB83-4FD0-B545-279774C01E87} = {AFAA0841-BD93-466F-B8F4-FB4EEC86F1FC}
44+
{3870C648-4AEA-4B85-BA3F-F2F63B96136A} = {AFAA0841-BD93-466F-B8F4-FB4EEC86F1FC}
3845
EndGlobalSection
3946
EndGlobal
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>3870c648-4aea-4b85-ba3f-f2f63b96136a</ProjectGuid>
10+
<RootNamespace>AbpCompanyName.AbpProjectName</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
14+
</PropertyGroup>
15+
<PropertyGroup>
16+
<SchemaVersion>2.0</SchemaVersion>
17+
</PropertyGroup>
18+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
19+
</Project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using Abp.Application.Services;
2+
3+
namespace AbpCompanyName.AbpProjectName
4+
{
5+
/// <summary>
6+
/// Derive your application services from this class.
7+
/// </summary>
8+
public abstract class AbpProjectNameAppServiceBase : ApplicationService
9+
{
10+
protected AbpProjectNameAppServiceBase()
11+
{
12+
LocalizationSourceName = AbpProjectNameConsts.LocalizationSourceName;
13+
}
14+
}
15+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Reflection;
2+
using Abp.Modules;
3+
4+
namespace AbpCompanyName.AbpProjectName
5+
{
6+
[DependsOn(typeof(AbpProjectNameCoreModule))]
7+
public class AbpProjectNameApplicationModule : AbpModule
8+
{
9+
public override void Initialize()
10+
{
11+
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
12+
}
13+
}
14+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Abp.Application.Services.Dto;
2+
3+
namespace AbpCompanyName.AbpProjectName.Products.Dtos
4+
{
5+
public class ProductDto : EntityDto
6+
{
7+
public string Name { get; set; }
8+
9+
public float Price { get; set; }
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Abp.Application.Services;
2+
using Abp.Application.Services.Dto;
3+
using AbpCompanyName.AbpProjectName.Products.Dtos;
4+
5+
namespace AbpCompanyName.AbpProjectName.Products
6+
{
7+
public interface IProductAppService : IApplicationService
8+
{
9+
ListResultOutput<ProductDto> GetAllProducts();
10+
}
11+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using Abp.Application.Services.Dto;
2+
using AbpCompanyName.AbpProjectName.Products.Dtos;
3+
4+
namespace AbpCompanyName.AbpProjectName.Products
5+
{
6+
public class ProductAppService : AbpProjectNameAppServiceBase, IProductAppService
7+
{
8+
public ListResultOutput<ProductDto> GetAllProducts()
9+
{
10+
return new ListResultOutput<ProductDto>(new []
11+
{
12+
new ProductDto
13+
{
14+
Name = "Acme 23 inch monitor.",
15+
Price = 899.9f
16+
},
17+
new ProductDto
18+
{
19+
Name = "Acme wireless keyboard and mouse set.",
20+
Price = 95.0f
21+
}
22+
});
23+
}
24+
}
25+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyConfiguration("")]
9+
[assembly: AssemblyCompany("")]
10+
[assembly: AssemblyProduct("AbpCompanyName.AbpProjectName.Application")]
11+
[assembly: AssemblyTrademark("")]
12+
13+
// Setting ComVisible to false makes the types in this assembly not visible
14+
// to COM components. If you need to access a type in this assembly from
15+
// COM, set the ComVisible attribute to true on that type.
16+
[assembly: ComVisible(false)]
17+
18+
// The following GUID is for the ID of the typelib if this project is exposed to COM
19+
[assembly: Guid("3870c648-4aea-4b85-ba3f-f2f63b96136a")]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "1.0.0.0-*",
3+
4+
"dependencies": {
5+
"AbpCompanyName.AbpProjectName.Core": "1.0.0.0-*"
6+
},
7+
8+
"frameworks": {
9+
"net452": {
10+
}
11+
}
12+
}

src/AbpCompanyName.AbpProjectName.Core/Localization/SourceFiles/AbpProjectName-tr.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"culture": "tr",
33
"texts": {
44
"HelloWorld": "Merhaba Dünya!",
5-
"ChangeLanguage": "Dil değiştir"
5+
"ChangeLanguage": "Dil değiştir",
6+
"OurProducts": "Ürünlerimiz"
67
}
78
}

0 commit comments

Comments
 (0)