Note that there are some explanatory texts on larger screens.

plurals
  1. POPersisting boolean logic
    primarykey
    data
    text
    <p>It is a kind of design related question rather than technical question. Title may not be perfect feel free to edit.</p> <p>I have a requirement as below: I want to save qualifications for a particular jobEntity(not to be confused with SQL Server job) in SQL Server 2012 from Table. For the same purpose I have another table say qualifications, which saves above qualifications against job which has a referential integrity with job table. The stored procedure for making this has parameter JobID and User defined table type of schema:</p> <pre><code>CREATE TYPE [dbo].[TableTypeQualificationJob] AS TABLE( [QualificationID] [int] NULL, [QualificationCriteria] [nvarchar](4000) NULL, [OptionTo] [bigint] NULL ) GO </code></pre> <p>I have corresponding entity in business layer. So when user creates multiple qualifications for job he passes List to function, and the underlying methods converts list in to datatable and is added in databases using stored procedure.</p> <p>The catch is the qualifications can in OR or AND. e.g if there are 5 qualifications say qualification1 qualification2 qualification3 qualification4 qualification5</p> <p>and enforced to the job as </p> <blockquote> <p>qualification1 OR qualification2 OR qualification3 AND qualification4 AND qualification5</p> </blockquote> <p>So its making three groups</p> <blockquote> <p>(qualification1 OR qualification2 OR qualification3) AND (qualification4) AND (qualification5)</p> </blockquote> <p>So how can I interprete it in QualificationEntity class and Database. I am calling SP using ADO.NET by manually converting list to DataTable for user-defined table type, how can I implement it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload