mirror of https://github.com/abpframework/abp.git
9 changed files with 60 additions and 16 deletions
@ -0,0 +1,15 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
|
||||
|
namespace Acme.BookStore |
||||
|
{ |
||||
|
public class BookAppService : AsyncCrudAppService<Book, BookDto, Guid>,IBookAppService |
||||
|
{ |
||||
|
public BookAppService(IRepository<Book, Guid> repository) |
||||
|
: base(repository) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace Acme.BookStore |
||||
|
{ |
||||
|
public class BookDto : EntityDto<Guid> |
||||
|
{ |
||||
|
[Required] |
||||
|
[StringLength(128)] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
public BookType Type { get; set; } |
||||
|
|
||||
|
public DateTime PublishDate { get; set; } |
||||
|
|
||||
|
public float Price { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace Acme.BookStore |
||||
|
{ |
||||
|
public interface IBookAppService : IAsyncCrudAppService<BookDto, Guid> |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue