mirror of https://github.com/abpframework/abp.git
32 changed files with 224 additions and 151 deletions
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 34 KiB |
@ -0,0 +1,12 @@ |
|||||
|
using AutoMapper; |
||||
|
|
||||
|
namespace Acme.BookStore |
||||
|
{ |
||||
|
public class BookStoreApplicationAutoMapperProfile : Profile |
||||
|
{ |
||||
|
public BookStoreApplicationAutoMapperProfile() |
||||
|
{ |
||||
|
//add your custom AutoMapper configuration
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.AutoMapper; |
||||
|
|
||||
|
namespace Acme.BookStore |
||||
|
{ |
||||
|
[AutoMapTo(typeof(Book))] |
||||
|
public class CreateUpdateBookDto |
||||
|
{ |
||||
|
[Required] |
||||
|
[StringLength(128)] |
||||
|
[Display(Name = "Name")] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
[Display(Name = "Type")] |
||||
|
public BookType Type { get; set; } = BookType.Undefined; |
||||
|
|
||||
|
[Display(Name = "PublishDate")] |
||||
|
public DateTime PublishDate { get; set; } |
||||
|
|
||||
|
[Display(Name = "Price")] |
||||
|
public float Price { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -1,25 +1,24 @@ |
|||||
// <auto-generated />
|
// <auto-generated />
|
||||
using System; |
using System; |
||||
using System.Collections.Generic; |
using Acme.BookStore.EntityFrameworkCore; |
||||
using Microsoft.EntityFrameworkCore; |
using Microsoft.EntityFrameworkCore; |
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
using Microsoft.EntityFrameworkCore.Infrastructure; |
||||
using Microsoft.EntityFrameworkCore.Metadata; |
using Microsoft.EntityFrameworkCore.Metadata; |
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
using Microsoft.EntityFrameworkCore.Migrations; |
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
||||
using Acme.BookStore.EntityFrameworkCore; |
|
||||
|
|
||||
namespace Acme.BookStore.Migrations |
namespace Acme.BookStore.Migrations |
||||
{ |
{ |
||||
[DbContext(typeof(BookStoreDbContext))] |
[DbContext(typeof(BookStoreDbContext))] |
||||
[Migration("20180528221424_Initial")] |
[Migration("20180701195241_Initial")] |
||||
partial class Initial |
partial class Initial |
||||
{ |
{ |
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
||||
{ |
{ |
||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||
modelBuilder |
modelBuilder |
||||
.HasAnnotation("ProductVersion", "2.1.0-preview2-30571") |
.HasAnnotation("ProductVersion", "2.1.1-rtm-30846") |
||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => |
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => |
||||
@ -1,5 +1,4 @@ |
|||||
using System; |
using System; |
||||
using System.Collections.Generic; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
namespace Acme.BookStore.Migrations |
namespace Acme.BookStore.Migrations |
||||
@ -0,0 +1,12 @@ |
|||||
|
using AutoMapper; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName |
||||
|
{ |
||||
|
public class MyProjectNameApplicationAutoMapperProfile : Profile |
||||
|
{ |
||||
|
public MyProjectNameApplicationAutoMapperProfile() |
||||
|
{ |
||||
|
//Configure your AutoMapper mapping configuration here...
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue