started data layer
							parent
							
								
									fab692c15e
								
							
						
					
					
						commit
						082745ac25
					
				@ -0,0 +1,26 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using OSI.API.Business.Database;
 | 
			
		||||
using OSI.API.Business.Objects;
 | 
			
		||||
 | 
			
		||||
namespace OSI.API.Business.DAO
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    public abstract class DAOBase<T> : MySQL
 | 
			
		||||
    {
 | 
			
		||||
        protected DAOBase(DBConnectionInformation connectionInformation) : base(connectionInformation)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected DAOBase(string server, string database, string username, string password) : base(server, database, username, password)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public abstract List<T> GetAll();
 | 
			
		||||
        public abstract T Get(int id);
 | 
			
		||||
        public abstract void Create(T itemToCreate);
 | 
			
		||||
        public abstract void Update(T itemToUpdate);
 | 
			
		||||
        public abstract void Delete(int id);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,45 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using OSI.API.Business.Database;
 | 
			
		||||
using OSI.API.Business.Objects;
 | 
			
		||||
 | 
			
		||||
namespace OSI.API.Business.DAO
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    public class InvoiceDAO : DAOBase<InvoiceObject>
 | 
			
		||||
    {
 | 
			
		||||
        public InvoiceDAO(DBConnectionInformation connectionInformation) : base(connectionInformation)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public InvoiceDAO(string server, string database, string username, string password) : base(server, database, username, password)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void Create(InvoiceObject itemToCreate)
 | 
			
		||||
        {
 | 
			
		||||
            throw new NotImplementedException();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void Delete(int id)
 | 
			
		||||
        {
 | 
			
		||||
            throw new NotImplementedException();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override InvoiceObject Get(int id)
 | 
			
		||||
        {
 | 
			
		||||
            throw new NotImplementedException();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override List<InvoiceObject> GetAll()
 | 
			
		||||
        {
 | 
			
		||||
            throw new NotImplementedException();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void Update(InvoiceObject itemToUpdate)
 | 
			
		||||
        {
 | 
			
		||||
            throw new NotImplementedException();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue