Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 643691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:18:37+00:00 2026-05-13T21:18:37+00:00

I’m trying to use Simple Savant within my application, to use SimpleDB I currently

  • 0

I’m trying to use Simple Savant within my application, to use SimpleDB

I currently have (for example)

public class Person
{
    public Guid Id { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public DateTime DateOfBirth { get; set; }
}

To use this with Simple Savant, i’d have to put attributes above the class declaration, and property – [DomainName(“Person”)] above the class, and [ItemName] above the Id property.

I have all my entities in a seperate assembly.
I also have my Data access classes an a seperate assembly, and a class factory selects, based on config, the IRepository (in this case, IRepository

I want to be able to use my existing simple class – without having attributes on the properties etc..
In case I switch out of simple db, to something else – then I only need to create a different implementation of IRepository.

Should I create a “DTO” type class to map the two together?

Is there a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:18:38+00:00Added an answer on May 13, 2026 at 9:18 pm

    You should check out the Savant documentation on Typeless Operations. Typeless operations allow you to interact with Savant using dynamically constructed mappings rather than data/model objects. You could, for example, create a dynamic mapping for your Person class like this:

    ItemMapping personMapping = ItemMapping.Create("Person", AttributeMapping.Create("Id", typeof (Guid)));
    personMapping.AttributeMappings.Add(AttributeMapping.Create("Name", typeof (string)));
    personMapping.AttributeMappings.Add(AttributeMapping.Create("Description", typeof(string)));
    personMapping.AttributeMappings.Add(AttributeMapping.Create("DateOfBirth", typeof(DateTime)));
    

    There are no functional restrictions when using this method because these ItemMappings are what Savant uses internally for all operations. It just takes a bit more work to understand and setup your mappings with this method.

    Here’s how you would retrieve a Person object using this method:

    Guid personId = Guid.NewGuid();
    PropertyValues values = savant.GetAttributes(personMapping, personId);
    Person p = PropertyValues.CreateItem(personMapping, typeof(Person), values);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.