Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace MusicSystem.Services.Models
- {
- using System;
- using System.Linq.Expressions;
- using MusicSystem.Model;
- using System.ComponentModel.DataAnnotations;
- using System.Collections.Generic;
- public class ArtistModel
- {
- public static Expression<Func<Artist, ArtistModel>> FromArtist
- {
- get
- {
- return a => new ArtistModel
- {
- ArtistId = a.ArtistId,
- Name = a.Name,
- DateOfBirth = a.DateOfBirth
- };
- }
- }
- public int ArtistId { get; set; }
- [Required]
- [MinLength(3)]
- [MaxLength(10)]
- public string Name { get; set; }
- public DateTime DateOfBirth { get; set; }
- public ICollection<int> AlbumIds { get; set; }
- public ICollection<int> SongIds { get; set; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement