public static Templates GetOne(int IdTemplate)
 {
     SqlCommand cb = new SqlCommand("GetTemplates");
     DataAccess db = new DataAccess();
     cb.Parameters.AddWithValue("@IdTemplate", IdTemplate);
     return DbSet<Templates>.RowToT(db.GetTable(cb).Rows[0]);
 }
 public static EntityFields GetOne(int Id)
 {
     SqlCommand cb = new SqlCommand("GetEntityFields");
     DataAccess db = new DataAccess();
     cb.Parameters.AddWithValue("@Id", Id);
     return GenericCodeFirst.DbSet<EntityFields>.RowToT(db.GetTable(cb).Rows[0]);
 }
 public static List<EntityFields> GetAll(int Id)
 {
     DataAccess db = new DataAccess();
     SqlCommand cb = new SqlCommand("GetAllEntityFields");
     cb.Parameters.AddWithValue("@Id", Id);
     return GenericCodeFirst.DbSet<EntityFields>.TableToListT(db.GetTable(cb));
 }
 public static DataType GetOne(int Id)
 {
     SqlCommand cb = new SqlCommand("GetDataType");
     DataAccess db = new DataAccess();
     cb.Parameters.AddWithValue("@Id", Id);
     return DbSet<DataType>.RowToT(db.GetTable(cb).Rows[0]);
 }
示例#5
0
        public static Entity GetOneByName(string name)
        {
            SqlCommand cb = new SqlCommand("GetEntityByName");
            DataAccess db = new DataAccess();
            cb.Parameters.AddWithValue("@name", name);

            return GenericCodeFirst.DbSet<Entity>.RowToT(db.GetTable(cb).Rows[0]);
        }
示例#6
0
        public static bool Exist(string name)
        {
            SqlCommand cb = new SqlCommand("GetEntityByName");
            DataAccess db = new DataAccess();
            cb.Parameters.AddWithValue("@name", name);

            if (db.GetTable(cb).Rows.Count >= 1)
                return true;
            else
                return false;

        }
 public static List<Templates> GetAll()
 {
     DataAccess db = new DataAccess();
     SqlCommand cb = new SqlCommand("GetAllTemplates");
     return DbSet<Templates>.TableToListT(db.GetTable(cb));
 }
 public static List<DataType> GetAll()
 {
     DataAccess db = new DataAccess();
     SqlCommand cb = new SqlCommand("GetAllDataType");
     return DbSet<DataType>.TableToListT(db.GetTable(cb));
 }
示例#9
0
 public static List<Entity> GetAll()
 {
     DataAccess db = new DataAccess();
     SqlCommand cb = new SqlCommand("GetAllEntity");
     return GenericCodeFirst.DbSet<Entity>.TableToListT(db.GetTable(cb));
 }