using Neo.Afx.ComponentModel;
using System.Collections.Generic;
using System.Linq;
namespace Neo.Afx.Admin.Sys
{
///
/// Afx admin database
///
public class AfxAdminSysDatabase : Database
{
///
/// Constructor
///
public AfxAdminSysDatabase()
: base(new AfxAdminSysContext())
{
}
#region GetEntities
///
/// Get all data from table.
///
/// List of objects
public IEnumerable GetEntities()
{
return (from item in Context.Entities
where item.IsCancelled == false
orderby item.EntityName ascending
select item).ToList();
}
///
/// Get data from table based on count.
///
/// Restricts amount returned items in the collection.
/// List of objects.
public IEnumerable GetEntities(int count)
{
return (from item in Context.Entities
where item.IsCancelled == false
orderby item.EntityName ascending
select item).Take(count).ToList();
}
#endregion
#region GetAuthenticationTypes
///
/// Get all data from table.
///
/// List of objects
public IEnumerable GetAuthenticationTypes()
{
return (from item in Context.AuthTypes
select item).ToList();
}
///
/// Get all data from table.
///
/// List of objects
public IEnumerable GetAuthenticationTypes(int count)
{
return (from item in Context.AuthTypes
select item).Take(count).ToList();
}
#endregion
#region GetAuthTypes
///
/// Get all data from table.
///
/// List of objects
public IEnumerable GetAuthTypes()
{
return (from item in Context.AuthTypes
select item).ToList();
}
///
/// Get data from table based on count.
///
/// Restricts amount returned items in the collection.
/// List of objects.
public IEnumerable GetAuthTypes(int count)
{
return (from item in Context.AuthTypes
select item).Take(count).ToList();
}
#endregion
#region SmsDeliveryMethods
///
/// Get all data from table.
///
/// List of objects
public IEnumerable GetSmsDeliveryMethod()
{
return (from item in Context.SmsDeliveryMethods
select item).ToList();
}
#endregion
#region GetObjectColumns
///
/// Get Object Columns By The Name of the Object
///
/// objectName 'String'
/// Object collection
public IEnumerable