Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: How to get user-defined datatype in a class?

$
0
0
I build a global datatype and named it <gringalet.users> in c1 console. then i try to get this datatype in public class width c#, but <gringalet.users> can not be found. I have imported composite.dll ,who can give me a hand?
my code is simple, it is not a asp.net mvc program,just is a common class for study.

using Composite.Data;
using Composite.Data.Types;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

publi class test{
using (DataConnection connection = new DataConnection())
{
gringalet.users myUser = DataConnection.New<gringalet.users>();
myUser.Id = Guid.NewGuid();
myUser.Name = "John Doe";
myUser = connection.Add<gringalet.users>(myUser);
}
}

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>