Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehmetalierol/514de24b98b8fb7b466374472dc4c439 to your computer and use it in GitHub Desktop.
Save mehmetalierol/514de24b98b8fb7b466374472dc4c439 to your computer and use it in GitHub Desktop.
using Company.Application.Common.Dto;
using System;
using System.Collections.Generic;
using System.Text;
namespace Company.Application.Dto
{
/// <summary>
/// Identity alt yapısını kullanarak oluşturduğumuz ApplicationRole entity miz ile gerekli CRUD işlemleri yapacağız
/// Bu Dto ise veritabanı ile etkileşimin son anına kadar verileri saklama ve proje içerisinde kullanma görevlerini icra edecek.
/// Ben IdentityRole base sınıfını açarak içinde bulunan propertyleri ve bizim sonradan eklediğimiz propertyleri bu dto içerisine aynı isimler ile oluşturdum
/// Diğer dto ların her birine yazdığım gibi burada da property isimleri ApplicationUser ımız ile aynı olmalı.
/// Burada dikkat edilmesi gereken husus şu, ApplicationRole sınıfımız IdentityRole sınıfından kalıtım aldığı için EntityBase sınıfımızdan kalıtım alamaz
/// Ancak dto için DtoBase sınıfını kullanabiliriz.
/// </summary>
public class ApplicationRoleDto : DtoBase
{
/// <summary>
/// IdentityRole base sınıfından gelen name propertysini aynı iismle dto ya ekledik
/// </summary>
public string Name { get; set; }
/// <summary>
/// Bizim sonradan eklediğimiz açıklama property si
/// </summary>
public string Description { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment