using AppContext.Entities; using Model; namespace Converters; public static class EntitiesToModels { public static User ToModel(this UserEntity entity) { return new User(entity.Id, entity.Name, entity.Email, entity.ProfilePicture, entity.IsAdmin); } public static Tactic ToModel(this TacticEntity entity) { return new Tactic(entity.Id, entity.Name, entity.OwnerId, entity.Type, entity.CreationDate); } public static Team ToModel(this TeamEntity entity) { return new Team(entity.Id, entity.Name, entity.Picture, entity.MainColor, entity.SecondColor); } }