Beispiel #1
0
        public PasswordEntity ConvertToEntity(PasswordModel entity)
        {
            if (entity == null)
                return null;

            var model = new PasswordEntity(entity.Id);
            model.Location = entity.Location;
            model.Name = entity.Name;
            model.Notes = entity.Notes;
            model.Password = entity.Password;
            model.Username = entity.Username;
            return model;
        }
Beispiel #2
0
        public async Task<PasswordModel> ConvertToModel(PasswordEntity entity)
        {
            if (entity == null)
                return null;

            var model = new PasswordModel(entity.Id);
            model.Location = entity.Location;
            model.Name = entity.Name;
            model.Notes = entity.Notes;
            model.Password = entity.Password;
            model.Username = entity.Username;
            return model;
        }