Esempio n. 1
0
 public static ClientDto FromDomain(Client client)
 {
     return new ClientDto
         {
             Id = client.Id,
             Name = client.Name,
             Enabled = client.Enabled,
             ClaimsUri = client.ClaimsUri
         };
 }
        public async Task Update(Client client)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            var clientDto = ClientDto.FromDomain(client);
            this.context.Clients.Update(clientDto);
            await this.context.SaveChangesAsync();
        }
Esempio n. 3
0
        public ClientApiModel(Client client)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            this.Id = client.Id;
            this.Name = client.Name;
            this.Enabled = client.Enabled;
            this.ClaimsUri = client.ClaimsUri;
        }