Exemple #1
0
        public virtual ApiDatabaseLogResponseModel MapBOToModel(
            BODatabaseLog boDatabaseLog)
        {
            var model = new ApiDatabaseLogResponseModel();

            model.SetProperties(boDatabaseLog.DatabaseLogID, boDatabaseLog.DatabaseUser, boDatabaseLog.@Event, boDatabaseLog.@Object, boDatabaseLog.PostTime, boDatabaseLog.Schema, boDatabaseLog.Tsql, boDatabaseLog.XmlEvent);

            return(model);
        }
        public virtual BODatabaseLog MapEFToBO(
            DatabaseLog ef)
        {
            var bo = new BODatabaseLog();

            bo.SetProperties(
                ef.DatabaseLogID,
                ef.DatabaseUser,
                ef.@Event,
                ef.@Object,
                ef.PostTime,
                ef.Schema,
                ef.Tsql,
                ef.XmlEvent);
            return(bo);
        }
        public virtual DatabaseLog MapBOToEF(
            BODatabaseLog bo)
        {
            DatabaseLog efDatabaseLog = new DatabaseLog();

            efDatabaseLog.SetProperties(
                bo.DatabaseLogID,
                bo.DatabaseUser,
                bo.@Event,
                bo.@Object,
                bo.PostTime,
                bo.Schema,
                bo.Tsql,
                bo.XmlEvent);
            return(efDatabaseLog);
        }
Exemple #4
0
        public virtual BODatabaseLog MapModelToBO(
            int databaseLogID,
            ApiDatabaseLogRequestModel model
            )
        {
            BODatabaseLog boDatabaseLog = new BODatabaseLog();

            boDatabaseLog.SetProperties(
                databaseLogID,
                model.DatabaseUser,
                model.@Event,
                model.@Object,
                model.PostTime,
                model.Schema,
                model.Tsql,
                model.XmlEvent);
            return(boDatabaseLog);
        }